-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Allow empty layer configs in manifests #10335
Conversation
Before the V2 registry changes, images with no config could be pushed. This change fixes a regression that made those images not able to be pushed to a registry. Signed-off-by: Euan Kemp <euank@euank.com>
LGTM |
2 similar comments
LGTM |
LGTM |
Allow empty layer configs in manifests
after the fact (no worries) but might be nice to have a test :P xoxo, |
jk there is one, ignore me |
@thaJeztah I really wanted to watch your linked video, but it's blocked in the United States :( Aren't we all citizens of the world? |
Oomph happens so me all the time as well, videos from the US being blocked in Europe. Net neutrality? Well, for fun this one should work http://bit.ly/1LcuSVy 😄 |
haha! thanks! |
This bug was introduced in commit 188b56c (V2 registry).
Previous to that commit, the following command would work without error:
tar c --files-from /dev/null | docker import - "$USER/test"; docker push "$USER/test"
After that commit, running the above results in the error:
FATA[0000] Error: Missing layer configuration
The imported image doesn't have to be empty to trigger this bug; it can be a rootfs with runnable static binaries and so on. It'll run fine with
docker run
, just not be able to be used indocker push
.This fix causes a nonexistent layer config to be treated as a "zero value" one instead of erroring out.
I verified that the added integ test did fail before making the graph manifest code change.