mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
The DockerVersion field was used by the legacy builder, and set when importing an image; when importing an image, this would potentially result in less reproducible images, as the docker version used to import the image would be encoded in the image's "v1" fields. For the legacy builder, including the version of docker used to build the image could still be useful information (but could be set as comment, similar to what BuildKit does), however, many code paths were also shared with other parts of the code; e.g., when listing images or inspecting images, the `DockerVersion` field would always be set to the current version of the docker daemon, and not taken from the information available in the image (if any). This patch removes locations where the `DockerVersion` field was set to the current version of the daemon binary. When inspecting an image, the field is still set with the information in the image itself (which may be empty in most cases). This also reduces the number of places where the `dockerversion` package is used, which still needs a new home. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>