Skip to content

docker inspect <image> returning wrong information (docker v1.8.3) #17780

@pommetjehorlepiep

Description

@pommetjehorlepiep

Description of problem:
I noticed when doing a docker inspect on a Docker Image that the "Image" information returned is incorrect. Although docker images shows a Repository (test) and Tag (1), docker inspect returns "" for "Image"

When image has a Parent, the "Image" field shows the Repository/Tag of the Parent image.

docker version:
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 05:27:08 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 05:27:08 UTC 2015
OS/Arch: linux/amd64

docker info:
Containers: 25
Images: 92
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 142
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
CPUs: 4
Total Memory: 15.7 GiB
Name: raven
ID: 32ES:J7WZ:HDAY:OUQH:HGNW:XTPM:ERLW:L3U6:B6RE:KOP2:LGST:7XDH

uname -a:

Linux raven 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09) x86_64 GNU/Linux

Environment details (AWS, VirtualBox, physical, etc.):
physical

How reproducible:
Just run docker inspect on a Docker image which has a Repository & Tag set.

Steps to Reproduce:

  1. Just run docker inspect on a Docker image which has a Repository & Tag set.

Actual Results:
For following image I expect "Image" to return "test:1" instead of just ""...:

docker images | grep d8ec
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
test 1 db8ec01b1f1db About an hour ago 167.5 MB

docker inspect db8ec01b1f1db
[

{
    "Id": "d8ec01b1f1dbb6442bfa4206c951ccb3614f2135eb66b3305e802d7d9486234b",
    "Parent": "",
    "Comment": "Imported from -",
    "Created": "2015-11-07T01:29:22.550951754Z",
    "Container": "",
    "ContainerConfig": {
        "Hostname": "",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": null,
        "Cmd": null,
        **"Image": ""**,
        "Volumes": null,
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": null
    },
    "DockerVersion": "1.8.3",
    "Author": "",
    "Config": {
        "Hostname": "",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": null,
        "Cmd": null,
        "Image": "",
        "Volumes": null,
        "WorkingDir": "",
        "Entrypoint": null,
        "OnBuild": null,
        "Labels": null
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Size": 167510717,
    "VirtualSize": 167510717,
    "GraphDriver": {
        "Name": "aufs",
        "Data": null
    }
}

Expected Results:
"Image", "test:1" instead of "Image", ""

Additional info:
It seems that if image has a Parent, the "Image" field actually displays the Repository/Tag info or the Parent Image...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions