[openstack-dev] [kolla] Obtaining version information for Docker container

Joshua Harlow harlowja at fastmail.com
Fri Nov 18 18:43:23 UTC 2016


So just something that I can share about what we are putting in our 
images, since they are getting built from jenkins we shove in pretty 
much all the jenkins build information into it:

$ IMG="...."
$ docker run $IMG cat /jenkins.json
{
     "Project": "glance",
     "Project git": "https://github.com/openstack/glance.git",
     "Project ref": "stable/liberty",
     "Deploy git": 
"git at github.secureserver.net:cloudplatform/openstack-deploy.git",
     "Deploy ref": "master",
     "Docker repo (for push)": "docker-cloud-ostack-local",
     "Requirement git": "git://git.openstack.org/openstack/requirements",
     "Requirement ref": "stable/liberty",
     "Python venv": "python2.7",
     "Unit test path": "./glance/tests/unit",
     "Kolla git": "https://github.com/openstack/kolla.git",
     "Kolla ref": "stable/newton",
     "Kolla image namespace": 
"docker-cloud-ostack-local.artifactory.secureserver.net",
     "Maintainers": "Cloud Platform [ELS] (cloud at godaddy.com)",
     "Job name": "glance",
     "Job build id": "55",
     "Job build number": "55",
     "Job build url": 
"http://jenkins-master.cloud.dev.phx3.gdg:8080/job/glance/55/",
     "Job started at": "Tue Nov 15 16:45:40 MST 2016",
     "Project details": {
         "version": "11.0.2.dev18",
         "name": "glance",
         "author": "OpenStack",
         "fullname": "glance-11.0.2.dev18",
         "url": "http://www.openstack.org/"
     }
}

That's what we are currently shoving in, which includes the project data 
also and various other useful goodies that help identify where the image 
came from and where it was built and when.

Steven Dake (stdake) wrote:
> Zhu,
>
> This isn’t the first time this question has been asked :)
>
> Since this is a technical matter, I’ve copied openstack-dev for a wider
> audience. I don’t have a clear solution to obtaining version manifests
> for container content or the upstream container version. Perhaps someone
> in our broader community may have an answer.
>
> The best I’ve got is we could add a general shell command that can be
> run with docker exec to obtain a proper version manifest of both 1 and 2
> (formatted in YAML or plaintext). This could be placed in the base
> container image to enable a general diagnostic and certificate of origin
> tool.
>
> Perhaps someone has a better solution?
>
> Regards
> -steve
>
>
> From: "zhu.zeyu at zte.com.cn <mailto:zhu.zeyu at zte.com.cn>"
> <zhu.zeyu at zte.com.cn <mailto:zhu.zeyu at zte.com.cn>>
> Date: Friday, November 18, 2016 at 1:56 AM
> To: Steven Dake <stdake at cisco.com <mailto:stdake at cisco.com>>
> Subject: <no subject>
>
> Hello,nice to meet you. I am a contributor of Kolla.
> Excuse me, I have a question to bother you.
> The question is that how to get openstack component version from a
> running container or image.
> you know , the version info is wrapped by the container, it is not easy
> to get them
> there are two type of versions
> one: version in a image, two: version in a running container
> two is easy, for example , we can get it by calling docker exec...
> but how to get the one, Is there any way, Thanks.
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list