Fails to get layer
See original GitHub issueWhen running build-push-action - specifically this workflow run on multi-stage Docker image following error occurs:
Step 18/22 : COPY --from=build --chown=nonroot:nonroot /tmp/target/spring-boot-loader/ ./
failed to export image: failed to create image: failed to get layer sha256:d2b5fefe683206943d83635f6efab18fba2f951b676432c3932047d3cb348381: layer does not exist
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Docker - failed to create image: failed to get layer
I got the following error: failed to export image: failed to create image: failed to get layer sha256:xxxxxxxxxxxxx: layer does not exist.
Read more >Docker build is failing because "failed to get layer"
Developer Community. We are seeing the error pasted to the end of this message. It seems to be an issue with docker. The...
Read more >Failed to get layers information - Toradex Community
I reverted to creating a clean build, without my custom layers, following the instructions here, but I'm still seeing the same problem. I.e....
Read more >Docker: failed to export/create/get image
Docker build failed with error failed to export image: failed to create image: failed to get layer. Here is how I solved it....
Read more >Error: The layer, <layer_name>, cannot be added to the map
Additionally, the error message is returned when one or more layers on the web map are inaccessible in ArcGIS Online Map Viewer Classic...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I actually figured this out. It seems to be a timing-related thing.
Add a “RUN true” between each copy step.
So:
COPY … RUN true COPY … RUN true COPY …
etc
That fixed it reliably for me.
Version 2 has been merged to the main branch and is therefore available via
uses: docker/build-push-action@v2
(mutable tag).As a reminder, this new version changes drastically and works with 3 new actions (login, setup-buildx and setup-qemu) that we have created. Many usage examples have been added to handle most use cases.
And it should fix this current issue. Don’t hesitate if you have any questions.