| Summary: | docker: unable to push to another repository | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Marek Goldmann <mgoldman> |
| Component: | docker-io | Assignee: | Lokesh Mandvekar <lsm5> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | alexl, jkeck, kgoudeaux, lsm5, mattdm, mgoldman |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | docker-io-0.7-0.13.dm.fc20 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-11-20 08:50:44 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
It seems this is central repository issue. Reported upstream: https://github.com/dotcloud/docker/issues/2055 After talking with upstream devs (at https://github.com/dotcloud/docker/issues/2055) I've confirmed that this is a Fedora issue. cc'ing Alex for help with the devicemapper patch After reading through the linked docker issue I believe I'm encountering the same (or very similar) problem while pushing to a private docker registry. Only the base image and one additional layer are pushed.
Given a simple Dockerfile with two empty context files foo.txt and bar.txt to force the creation of two additional layers:
from mattdm/fedora:f19
ADD foo.txt /etc/foo.txt
ADD bar.txt /etc/bar.txt
we build:
sudo docker build -t vm-newdocker:5000/test .
Uploading context 61440 bytes
Step 1 : FROM mattdm/fedora:f19
---> 50f374c05c2c
Step 2 : ADD foo.txt /etc/foo.txt
---> 5a29816a5219
Step 3 : ADD bar.txt /etc/bar.txt
---> ebf30c70b080
Successfully built ebf30c70b080
Note the last image id prefix, ebf30c70b080. Now we push:
sudo docker push vm-newdocker:5000/test
The push refers to a repository [vm-newdocker:5000/test] (len: 1)
Sending image list
Pushing repository vm-newdocker:5000/test (1 tags)
Pushing tags for rev [50f374c05c2c07d28620824a6f8427d50879d92f5be6b318d3340f4f0f6120a2] on {http://vm-newdocker:5000/v1/repositories/test/tags/latest}
Image 50f374c05c2c07d28620824a6f8427d50879d92f5be6b318d3340f4f0f6120a2 already pushed, skipping
Pushing 5a29816a5219dbc1f3083e7737f1dce92baa5c27bb12e02d6428da82cdb093f0
Pushing tags for rev [5a29816a5219dbc1f3083e7737f1dce92baa5c27bb12e02d6428da82cdb093f0] on {http://vm-newdocker:5000/v1/repositories/test/tags/latest}
Layer ebf30c70b080 is never pushed. The base image and one layer above are checked (50f374c05c2c and 5a29816a5219) but the next is ignored.
For non-trivial dockerfiles the pattern is the same except more layers are ignored.
And as you'd expect, attempting to pull results in a 404 for the layer that wasn't pushed:
sudo docker pull vm-newdocker:5000/test
Pulling repository vm-newdocker:5000/test
50f374c05c2c: Download complete
5a29816a5219: Download complete
d5abdc9c6b5a: Download complete
ebf30c70b080: Error pulling image (latest) from vm-newdocker:5000/test, Internal server error: 404 trying to fetch remote history for ebf30c70b080a6144e15013dc59a138e8ba6b94faf2013/10/17 16:20:24 Internal server error: 404 trying to fetch remote history for test
Using: docker-io-0.6.3-2.devicemapper.fc19.x86_64
I do not see this issue with docker-io-0.7-0.13.dm.fc20 anymore, I'm closing this ticket. Feel free to reopen in case it shows up again. I can confirm. docker-io-0.7-0.13.dm.fc19.x86_64 is pushing images correctly. |
The problem is that after I pushed to one repo (goldmann/f20 in the example) I cannot push to another repos. I've created a few images, I tagged them and assigned a different repo (goldmann/sandbox). I've tried to push them with the docker push goldmann/sandbox command, but it tries to push the image I've pushed to goldmann/f20 repo: ========================= [root@localhost ~]# docker images REPOSITORY TAG ID CREATED SIZE goldmann/sandbox blah bbf9eb60ecb5 2 days ago 11.64 MB (virtual 380.9 MB) goldmann/sandbox hmm 970a260d2736 2 days ago 4.096 kB (virtual 1.451 GB) <none> <none> d51bd0ead75f 2 days ago 4.096 kB (virtual 1.451 GB) <none> <none> f1f136485cb0 3 days ago 4.096 kB (virtual 1.451 GB) <none> <none> de0a3accac55 3 days ago 4.096 kB (virtual 1.451 GB) <none> <none> b47b93d1e937 3 days ago 4.096 kB (virtual 1.451 GB) <none> <none> 685f4159a8aa 3 days ago 4.096 kB (virtual 1.451 GB) <none> <none> 60fdd1fdffbc 3 days ago 4.096 kB (virtual 1.451 GB) goldmann/f20 latest 5c47c0892695 3 days ago 369.3 MB (virtual 369.3 MB) <none> <none> 366ff524eea0 4 days ago 4.096 kB (virtual 1.412 GB) <none> <none> 89f3227048c5 4 days ago 4.096 kB (virtual 1.412 GB) <none> <none> 453d421a9bdb 4 days ago 166 MB (virtual 539.1 MB) <none> <none> a8ebdc97a85d 5 days ago 4.096 kB (virtual 1.009 GB) <none> <none> d103a432ddd4 5 days ago 15.16 MB (virtual 388.4 MB) <none> <none> d7d3c539a299 5 days ago 166.9 MB (virtual 540.1 MB) mattdm/fedora latest 22a514a5aa4c 5 days ago 373.2 MB (virtual 373.2 MB) <none> <none> 6893658939cd 5 days ago 38.76 kB (virtual 1.009 GB) <none> <none> f7c607ca8a73 5 days ago 4.096 kB (virtual 1.009 GB) <none> <none> 8d778e730826 5 days ago 166.6 MB (virtual 539.8 MB) <none> <none> 21e2d383d388 5 days ago 166.6 MB (virtual 539.8 MB) <none> <none> 1b91ea216c4c 5 days ago 115.5 MB (virtual 488.7 MB) <none> <none> 428c5ea7f10a 5 days ago 115.5 MB (virtual 488.7 MB) <none> <none> 4583d3911946 5 days ago 115.5 MB (virtual 488.7 MB) mattdm/fedora f19 50f374c05c2c 11 days ago 371.6 MB (virtual 371.6 MB) mattdm/fedora f20rc3.small 97fc5bf7f8d4 12 days ago 220.6 MB (virtual 220.6 MB) [root@localhost ~]# docker push goldmann/f20 The push refers to a repository [goldmann/f20] (len: 1) Sending image list Pushing repository goldmann/f20 (1 tags) Pushing 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c Image 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c already pushed, skipping Pushing tags for rev [5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c] on {https://registry-1.docker.io/v1/repositories/goldmann/f20/tags/latest} [root@localhost ~]# docker push goldmann/sandbox The push refers to a repository [goldmann/sandbox] (len: 2) Sending image list Pushing repository goldmann/sandbox (2 tags) Pushing 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c Image 5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c already pushed, skipping Pushing tags for rev [5c47c08926951ad84aa164b300f13dc3ebfbb72b626163806415bbe7b3e30d2c] on {https://registry-1.docker.io/v1/repositories/goldmann/sandbox/tags/hmm} ================================= Please note that the image IDs are the same when pushing to f20 and sandbox repos. The goldmann/sandox repository wasn't created in the docker image registry and no image has been uploaded, but I should have there two images (bbf9eb60ecb5 and 970a260d2736). Version-Release number of selected component (if applicable): docker-io-0.6.3-2.devicemapper.fc20.x86_64 This is the 0.6.3-1 release with the patch from RHBZ#1012952.