RUN
s between two FROM
s never run
#2496
-
Unlike the legacy builder, when using two FROM alpine:3.14.3 AS foo1
RUN sleep infinity
FROM alpine:3.15.0 When using
However, when using Buildkit, the build terminates immediately, not running the specified
Docker Version: Client:
Version: 20.10.7
API version: 1.41
Go version: go1.13.8
Git commit: 20.10.7-0ubuntu1~20.04.2
Built: Fri Oct 1 14:07:06 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:52:31 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit: v1.0.1-0-g4144b63
docker-init:
Version: 0.19.0
GitCommit: de40ad0 Docker config: {
"registry-mirrors": [],
"insecure-registries": [],
"debug": false,
"experimental": false,
"features": {
"buildkit": true
},
"builder": {
"gc": {
"enabled": true,
"defaultKeepStorage": "20GB"
}
}
} I have only tested this inside Ubuntu 20.04 LTS in WSL2 on Windows 10 version 1909:
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.18363 N/A Build 18363
OS Manufacturer: Microsoft Corporation |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@AbhyudayaSharma This is by design in BuildKit. Here the final stage you are building has no dependency on the first one so it's skipped. See also docker/build-push-action#377 (comment). |
Beta Was this translation helpful? Give feedback.
@AbhyudayaSharma This is by design in BuildKit. Here the final stage you are building has no dependency on the first one so it's skipped. See also docker/build-push-action#377 (comment).