New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consecutive COPY operations causing "layer does not exist" error in 18.06-ce #38866
Labels
Comments
autophagy
added a commit
to crate/docker-crate
that referenced
this issue
Mar 15, 2019
There seems to be a bug in docker affecting Jenkins' ability (as well as my own, locally) to build docker images with 3 consecutive COPY/ADD commands. Previously, this would result in: ``` ---> d21806a43c11 Step 17/21 : COPY --chown=1000:0 config/crate.yml /crate/config/crate.yml ---> d3ce15d62c5f Step 18/21 : COPY --chown=1000:0 config/log4j2.properties /crate/config/log4j2.properties ---> 3e09f7cc5247 Step 19/21 : COPY docker-entrypoint.sh / failed to export image: failed to create image: failed to get layer sha256:da5198c8160f19dfcd3a574a0ca58243c26e40f9eeacba76a5f5428a41cd7616: layer does not exist ``` Running the docker build a second time would pass successfuly. This has been reported in multiple places: moby/moby#37965 (comment) moby/moby#38866 Moving 2 copy commands before the label and keeping the docker entrypoint addition afterwards circumvents this issue. A little ugly, but until it is fixed in Docker, we can't build/deploy our CrateDB images on Jenkins.
1 task
autophagy
added a commit
to crate/docker-crate
that referenced
this issue
Mar 16, 2019
There seems to be a bug in docker affecting Jenkins' ability (as well as my own, locally) to build docker images with 3 consecutive COPY/ADD commands. Previously, this would result in: ``` ---> d21806a43c11 Step 17/21 : COPY --chown=1000:0 config/crate.yml /crate/config/crate.yml ---> d3ce15d62c5f Step 18/21 : COPY --chown=1000:0 config/log4j2.properties /crate/config/log4j2.properties ---> 3e09f7cc5247 Step 19/21 : COPY docker-entrypoint.sh / failed to export image: failed to create image: failed to get layer sha256:da5198c8160f19dfcd3a574a0ca58243c26e40f9eeacba76a5f5428a41cd7616: layer does not exist ``` Running the docker build a second time would pass successfuly. This has been reported in multiple places: moby/moby#37965 (comment) moby/moby#38866 Moving 2 copy commands before the label and keeping the docker entrypoint addition afterwards circumvents this issue. A little ugly, but until it is fixed in Docker, we can't build/deploy our CrateDB images on Jenkins.
autophagy
added a commit
to crate/docker-crate
that referenced
this issue
Mar 16, 2019
There seems to be a bug in docker affecting Jenkins' ability (as well as my own, locally) to build docker images with 3 consecutive COPY/ADD commands. Previously, this would result in: ``` ---> d21806a43c11 Step 17/21 : COPY --chown=1000:0 config/crate.yml /crate/config/crate.yml ---> d3ce15d62c5f Step 18/21 : COPY --chown=1000:0 config/log4j2.properties /crate/config/log4j2.properties ---> 3e09f7cc5247 Step 19/21 : COPY docker-entrypoint.sh / failed to export image: failed to create image: failed to get layer sha256:da5198c8160f19dfcd3a574a0ca58243c26e40f9eeacba76a5f5428a41cd7616: layer does not exist ``` Running the docker build a second time would pass successfuly. This has been reported in multiple places: moby/moby#37965 (comment) moby/moby#38866 Moving 2 copy commands before the label and keeping the docker entrypoint addition afterwards circumvents this issue. A little ugly, but until it is fixed in Docker, we can't build/deploy our CrateDB images on Jenkins.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Seeing a problem with the following Dockerfile on 18.06-ce on Amazon Linux ECS-optimised build, with
Docker using
lvs
for its storage, with consecutive COPY commands causing "layer does not exist" error.Steps to reproduce the issue:
docker build -t my-org/my-image:my-tag -f Dockerfile.test .
--no-cache
Describe the results you received:
Describe the results you expected:
Successfully built image.
Additional information you deem important (e.g. issue happens only occasionally):
By re-arranging the instructions in the Dockerfile I was able to get this to build successfully:
... which is obviously a bit of a mess towards the end. Not ideal.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
This is an Amazon Linux AMI, one of the ECS-Optimised versions -
amzn-ami-2017.03.g-amazon-ecs-optimized (ami-13f7226a)
. It has been updated with a fullsudo yum update
operation, including bringing Docker up to version 18.06-ce.The text was updated successfully, but these errors were encountered: