Reputation: 1423
I have built a docker image through Dockerfile with the docker build
command. If I check the generated image with the docker inspect
command, then I can see an empty "DockerVersion" value.
$ docker build -t myimage:latest .
$ docker inspect myimage:latest
...
"Container": "...",
"ContainerConfig": {
...
},
"DockerVersion": "",
"Author": "",
"Config": {
...
This occurs not just for a specific Dockerfile
but for all Dockerfile
built on my local environment.
I built docker images on a Mac and the Docker Engine version is 20.10.8 (Docker Desktop).
Dockerfile
is a very simple file with only a few lines with no special content.
The build was also executed with docker build -t xxxx:xxxx .
without any special features.
Have any of you ever had this kind of experience?
Upvotes: 1
Views: 474
Reputation: 2594
That happens also on the images build on my Windows 10 machine with Docker Desktop running under WSL2. And it's a normal behavior.
Those fields, like DockerVersion
, Author
and so on, are part of the Docker images, but they're not used anymore as they're not part of the standard for open containers.
On the opposite, the Open Containers Initiative (OCI) has defined a standard set of annotations to use in all the image manifests.
Upvotes: 2