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

docker load clears DockerVersion #6340

Closed
mpasternacki opened this issue Jun 10, 2014 · 3 comments · Fixed by #6571
Closed

docker load clears DockerVersion #6340

mpasternacki opened this issue Jun 10, 2014 · 3 comments · Fixed by #6571

Comments

@mpasternacki
Copy link

This prevents images created with Docker 0.12+, saved, and loaded from being pushed to registry, because without DockerVersion field, registry seems to expect lowercase id field rather than new Id (I get HTTP code 400 while uploading metadata: {"error": "Missing keyid' in JSON"}`).

Reproduction:

vagrant@packer-debian-7:~/i$ cat Dockerfile
FROM busybox:latest
ENV FOO bar
vagrant@packer-debian-7:~/i$ docker build -q .
[…]
Successfully built e2363e13d2e7
vagrant@packer-debian-7:~/i$ docker inspect -f 'id:{{.id}} Id:{{.Id}} DockerVersion:{{.DockerVersion}}' e2363e13d2e7
id:<no value> Id:e2363e13d2e738843ecbe85bdd23b8d3b89f1bbba6d5ba24b1cb91294bc4f895 DockerVersion:1.0.0
vagrant@packer-debian-7:~/i$ docker save e2363e13d2e7 > e2363e13d2e7.tar
vagrant@packer-debian-7:~/i$ tar -xf e2363e13d2e7.tar -O e2363e13d2e7/json | json_pp | grep DockerVersion
   "DockerVersion" : "1.0.0",
vagrant@packer-debian-7:~/i$ docker rmi e2363e13d2e7
Deleted: e2363e13d2e738843ecbe85bdd23b8d3b89f1bbba6d5ba24b1cb91294bc4f895
vagrant@packer-debian-7:~/i$ docker load < e2363e13d2e7.tar
vagrant@packer-debian-7:~/i$ docker inspect -f 'id:{{.id}} Id:{{.Id}} DockerVersion:{{.DockerVersion}}' e2363e13d2e7
id:<no value> Id:e2363e13d2e738843ecbe85bdd23b8d3b89f1bbba6d5ba24b1cb91294bc4f895 DockerVersion:
vagrant@packer-debian-7:~/i$ docker inspect -f 'DockerVersion:{{printf "%q" .DockerVersion}}' e2363e13d2e7
DockerVersion:""

Version info:

vagrant@packer-debian-7:~/i$ uname -a
Linux packer-debian-7 3.14-0.bpo.1-amd64 #1 SMP Debian 3.14.5-1~bpo70+1 (2014-06-05) x86_64 GNU/Linux
vagrant@packer-debian-7:~/i$ docker version
Client version: 1.0.0
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 63fe64c
Server version: 1.0.0
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 63fe64c
vagrant@packer-debian-7:~/i$ docker info
Containers: 0
Images: 41
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 41
Execution Driver: native-0.2
Kernel Version: 3.14.0-0.bpo.1-amd64
Username: 3ofcoins
Registry: [https://index.docker.io/v1/]
WARNING: No memory limit support
WARNING: No swap limit support
@vieux
Copy link
Contributor

vieux commented Jun 11, 2014

@vbatts can you take a look ?

@vbatts
Copy link
Contributor

vbatts commented Jun 11, 2014

@vieux will do

@vbatts
Copy link
Contributor

vbatts commented Jun 11, 2014

this is a part of the CamelCase changes 68fb7f4

@vbatts vbatts self-assigned this Jun 11, 2014
vbatts added a commit to vbatts/moby that referenced this issue Jun 12, 2014
Adding a failing test, for
moby#6340

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
vbatts added a commit to vbatts/moby that referenced this issue Jun 12, 2014
due to the CamelCase changes
moby@68fb7f4

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants