Bug 1375436 - 'docker version' command displays incorrect Git commit information
Summary: 'docker version' command displays incorrect Git commit information
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-13 06:48 UTC by Akihiro Matsushima
Modified: 2019-03-06 02:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-30 14:57:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CentOS 11398 0 None None None 2016-09-13 06:48:58 UTC

Description Akihiro Matsushima 2016-09-13 06:48:59 UTC
Description of problem:
The 'docker version' command displays incorrect Git commit information because you have used %autosetup macro with '-S git' in the spec file lately.

Version-Release number of selected component (if applicable):
docker-1.10.3-46.el7.10.x86_64

How reproducible:
always

Steps to Reproduce:
1. yum install --enablerepo=rhel-7-server-extras-rpms docker
2. systemctl start docker.service
3. docker version

Actual results:
$ docker version
Client:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.10.x86_64
 Go version:      go1.6.2
 Git commit:      2a93377-unsupported
 Built:           Fri Jul 29 13:45:25 2016
 OS/Arch:         linux/amd64

Server:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.10.x86_64
 Go version:      go1.6.2
 Git commit:      2a93377-unsupported
 Built:           Fri Jul 29 13:45:25 2016
 OS/Arch:         linux/amd64

Expected results:
$ docker version
Client:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.10.x86_64
 Go version:      go1.6.2
 Git commit:      f9d4a2c/1.10.3
 Built:           Fri Jul 29 13:45:25 2016
 OS/Arch:         linux/amd64

Server:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.10.x86_64
 Go version:      go1.6.2
 Git commit:      f9d4a2c/1.10.3
 Built:           Fri Jul 29 13:45:25 2016
 OS/Arch:         linux/amd64


Additional info:
If you intend to use DOCKER_GITCOMMIT then you should not initialize git repository.

Please refer to
https://github.com/projectatomic/docker/blob/rhel7-1.10.3/hack/make.sh#L69-L80
https://github.com/docker/docker/blob/master/hack/make.sh#L81-L100

Comment 2 Daniel Walsh 2016-09-13 12:25:53 UTC
Lokesh could you look into this?


Note You need to log in before you can comment on or make changes to this bug.