Skip to content
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

local img.Save() should fail with a helpful error if base image does not exist #58

Open
natalieparellano opened this issue Aug 25, 2020 · 0 comments
Labels
status/ready type/enhancement New feature or request

Comments

@natalieparellano
Copy link
Member

Today if you do the following:

local.NewImage("some-image", dockerClient, local.FromBaseImage("some-base-image"))

and some-base-image doesn't exist on the daemon, the image will fail to save on Windows with a cryptic error:

Failed to save image:failed to write image to the following tags: [lifecycle:101f194-dirty: image load 'lifecycle:101f194-dirty'. first error: embedded daemon response: re-exec error: exit status 1: output: ProcessBaseLayer \\?\C:\ProgramData\Docker\windowsfilter\49e547ec94502d3e8d1e8de5be79a631f6247fb6fadb57bf288c4c22981a84af: Cannot create a file when that file already exists.] exit status 1

Through experimentation, it seems like the image will actually save successfully on Linux, though I am not sure how this works and why it is different.

pack and lifecycle/tools/image/main.go currently circumvent this issue by pulling the base image prior to initializing the new image.

Outcome

imgutil should produce a helpful error in this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant