Description
Description
I am investigating this strange output:
❯ docker image ls --digests node
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
node 8.11.1-alpine sha256:1b1928c9eea9e6cd5ff6155a2adda33a022a08911a1418f5ebe8ff992abd2a69 e707e7ad7186 40 hours ago 68.1MB
node 8.11.1-alpine sha256:7daef4e511bcd3655c18cb58bfc382a4391b04c7881c4debc17a5882908917e4 e707e7ad7186 40 hours ago 68.1MB
docker image inspect node@sha256:1b1928c9eea9e6cd5ff6155a2adda33a022a08911a1418f5ebe8ff992abd2a69
[
{
"Id": "sha256:e707e7ad71865cab957512e1fab31873b7996e239859d733470eb707c31dd37d",
"RepoTags": [
"node:8.11.1-alpine"
],
"RepoDigests": [
"node@sha256:1b1928c9eea9e6cd5ff6155a2adda33a022a08911a1418f5ebe8ff992abd2a69",
"node@sha256:7daef4e511bcd3655c18cb58bfc382a4391b04c7881c4debc17a5882908917e4"
],
"Parent": "",
"Comment": "",
"Created": "2018-04-03T00:35:00.092582659Z",
"Container": "21b6446f3c4ba739e7645bae00bcd1052effd926ddfba16089dfdd709e1fa051",
"ContainerConfig": {
"Hostname": "21b6446f3c4b",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NODE_VERSION=8.11.1",
"YARN_VERSION=1.5.1"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"CMD [\"node\"]"
],
"ArgsEscaped": true,
"Image": "sha256:e894d8acb96ad35ff60b4d77514f9cb5dc830db23df101925e373da5c37d901d",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": [],
"Labels": {}
},
"DockerVersion": "17.06.2-ce",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NODE_VERSION=8.11.1",
"YARN_VERSION=1.5.1"
],
"Cmd": [
"node"
],
"ArgsEscaped": true,
"Image": "sha256:e894d8acb96ad35ff60b4d77514f9cb5dc830db23df101925e373da5c37d901d",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": [],
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 68065188,
"VirtualSize": 68065188,
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:9dfa40a0da3b1a8a7c34abc596d81ede2dba4ecd5c0a7211086d6685da1ce6ef",
"sha256:0f0aa102cc1f410533a36217f4fadf887a60af50c9b741a227bfededd3952616",
"sha256:2832e3e1d3a945be7ec4f57c6736c30a473408025438706e8138d3a50e036195"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
docker image inspect node@sha256:7daef4e511bcd3655c18cb58bfc382a4391b04c7881c4debc17a5882908917e4
[
{
"Id": "sha256:e707e7ad71865cab957512e1fab31873b7996e239859d733470eb707c31dd37d",
"RepoTags": [
"node:8.11.1-alpine"
],
"RepoDigests": [
"node@sha256:1b1928c9eea9e6cd5ff6155a2adda33a022a08911a1418f5ebe8ff992abd2a69",
"node@sha256:7daef4e511bcd3655c18cb58bfc382a4391b04c7881c4debc17a5882908917e4"
],
"Parent": "",
"Comment": "",
"Created": "2018-04-03T00:35:00.092582659Z",
"Container": "21b6446f3c4ba739e7645bae00bcd1052effd926ddfba16089dfdd709e1fa051",
"ContainerConfig": {
"Hostname": "21b6446f3c4b",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NODE_VERSION=8.11.1",
"YARN_VERSION=1.5.1"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"CMD [\"node\"]"
],
"ArgsEscaped": true,
"Image": "sha256:e894d8acb96ad35ff60b4d77514f9cb5dc830db23df101925e373da5c37d901d",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": [],
"Labels": {}
},
"DockerVersion": "17.06.2-ce",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NODE_VERSION=8.11.1",
"YARN_VERSION=1.5.1"
],
"Cmd": [
"node"
],
"ArgsEscaped": true,
"Image": "sha256:e894d8acb96ad35ff60b4d77514f9cb5dc830db23df101925e373da5c37d901d",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": [],
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 68065188,
"VirtualSize": 68065188,
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:9dfa40a0da3b1a8a7c34abc596d81ede2dba4ecd5c0a7211086d6685da1ce6ef",
"sha256:0f0aa102cc1f410533a36217f4fadf887a60af50c9b741a227bfededd3952616",
"sha256:2832e3e1d3a945be7ec4f57c6736c30a473408025438706e8138d3a50e036195"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
Steps to reproduce the issue:
- docker pull node:8.11.1-alpine@sha256:7daef4e511bcd3655c18cb58bfc382a4391b04c7881c4debc17a5882908917e4
- docker pull node:8.11.1-alpine@sha256:1b1928c9eea9e6cd5ff6155a2adda33a022a08911a1418f5ebe8ff992abd2a69
Describe the results you received:
Two different digests with many identical characteristics.
Describe the results you expected:
I thought if the digest changed according to the API then the image must have changed.
Additional information you deem important (e.g. issue happens only occasionally):
I was investigating these to try to understand why the node:8.11.1-alpine
tag on Docker Hub changed digests without explanation and without change to the source Dockerfile on GitHub. Although they seem to have been published at the same time, the Docker Hub API was returning the first one for over a day and then switched to the second one without explanation. For users who "pin" their digests for build reproducibility, this type of churn of digest is undesirable.
Output of docker version
:
Docker version 18.03.0-ce, build 0520e24
Output of docker info
:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 2
Server Version: 18.03.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 14
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.87-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: IUXP:WW6Z:2H5X:UKYQ:OGFM:3US3:UEPZ:RMK7:TSGG:647S:W2K4:LQ32
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 21
Goroutines: 39
System Time: 2018-04-05T05:23:20.5802269Z
EventsListeners: 2
HTTP Proxy: docker.for.mac.http.internal:3128
HTTPS Proxy: docker.for.mac.http.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.):
macOS High Sierra