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

CamelCase image.Image json marshalling #6385

Closed
wants to merge 2 commits into from

Conversation

vbatts
Copy link
Contributor

@vbatts vbatts commented Jun 12, 2014

This fixes #6340

Adding a failing test, for
moby#6340

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
due to the CamelCase changes
moby@68fb7f4

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
@vbatts
Copy link
Contributor Author

vbatts commented Jun 12, 2014

ping @vieux

@vieux
Copy link
Contributor

vieux commented Jun 12, 2014

I think the image struct is stored on disk no ? I don't think we can change it ?

@crosbymichael
Copy link
Contributor

On disk and in the registry. We would have to support both keys

@vbatts
Copy link
Contributor Author

vbatts commented Jun 14, 2014

this is a problem. We're going to break something either way, i think.
Or we change docker save to not Unmarshal the json, just dump the json that is disk. And define the contexts that json is manipulated. Because now looking at it, if you

#> docker pull scratch:latest
Pulling repository scratch
511136ea3c5a: Download complete
#> cat /var/lib/docker/graph/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json
{"id":"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158","comment":"Imported from -","created":"2013-06-13T14:03:50.821769-07:00","container_config":{"Hostname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":null,"Dns":null,"Image":"","Volumes":null,"VolumesFrom":""},"docker_version":"0.4.0","architecture":"x86_64"}
#> docker save scratch:latest | tar x
#> cat 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json
{"Architecture":"x86_64","Author":"","Comment":"Imported from -","Config":null,"Container":"","ContainerConfig":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":null,"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":null,"Env":null,"ExposedPorts":null,"Hostname":"","Image":"","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":null,"WorkingDir":""},"Created":"2013-06-13T14:03:50.821769-07:00","DockerVersion":"0.4.0","Id":"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158","Os":"","Parent":"","Size":0}

These are completely different, with regard to formatting of keys. Which means the consistent of this image's metadata has changed. Furthermore, this means the tarsum of this image is now different as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker load clears DockerVersion
3 participants