docker-save-last-layer icon indicating copy to clipboard operation
docker-save-last-layer copied to clipboard

Error Loading Image

Open brthor opened this issue 6 years ago • 6 comments

From https://github.com/moby/moby/issues/8039#issuecomment-569232360

@cnd wrote

when I use https://github.com/brthor/docker-save-last-layer I get error loading image alike open /var/lib/docker/tmp/docker-import-983776602/b861fd09fe6e59a22c7e31c58fb15fc25c15c51b870679a6cc966eeb9b8df5b7/layer.tar: no such file or directory

brthor avatar Dec 27 '19 10:12 brthor

@cnd did building with --squash resolve the issue?

brthor avatar Dec 27 '19 10:12 brthor

@brthor tested with --squash build but I'm still getting same error sadly

Cynede avatar Dec 30 '19 06:12 Cynede

open /var/lib/docker/tmp/docker-import-032134328/058bdef7ddd2e1394aee5c835caaf50764cfc9669a1cffe0478c1b22bb85d342/layer.tar: no such file or directory

Cynede avatar Dec 30 '19 06:12 Cynede

Are you transporting the archive between machines or docker hosts?

brthor avatar Dec 31 '19 01:12 brthor

yes

Cynede avatar Dec 31 '19 06:12 Cynede

I suspect the issue is related to the fact that the base layers are stripped from the image archive.

Doing a docker pull of the base image on the new machine prior to calling docker load should alleviate the problem in most cases.

If the base image has changed between the time you used docker-save-last and calling docker pull on the new host, the layer ids will not match and this problem will still be present. This can happen when a specific tag is updated to a new version.

In this case it is necessary to call docker pull on the specific digest that was used when calling docker-save-last.

See this Stackoverflow answer for an example: https://stackoverflow.com/a/40730725

brthor avatar Jan 03 '20 00:01 brthor