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

hu.zhijiang at zte.com.cn hu.zhijiang at zte.com.cn
Thu Dec 1 10:57:23 UTC 2016

For #1, I think the requirement is that before pulling the image to local 
registry, one can get its metadata about the version info before hand, 
thus save time and space spend on pulling wrong images. I don't know if 
the info in docker label can be retrieved before before pulling the image 
to local registry. If not, holding such info in docker label may be not a 
good solution since we have to pull the image first. 

Another thought is how about let the kolla build command to generate a 
report about what component version it used to build for each image and 
just let it output this report to a file or stdout? Then this well 
formatted output can be published along with the images(docker save...) 
but not inside of images. 


发件人:         Pete Birley <pete at port.direct>
收件人:         "OpenStack Development Mailing List (not for usage 
questions)" <openstack-dev at lists.openstack.org>, Adrian Mouat 
<adrian.mouat at container-solutions.com>, 
日期:   2016-11-19 02:17
主题:   Re: [openstack-dev] [kolla] Obtaining version information for 
Docker container

I've been thinking about this a bit as well, and think that we should 
consider using the docker label schema (http://label-schema.org/rc1/) as a 
solution for #1, it would be possible to add labeling to kolla-build to 
add these labels simply. This solution is gaining traction in the docker 
community, and integrates well with external tools e.g. 
https://microbadger.com. One of the maintainers of this project (Adrian 
Mouat) works in the same room as me and I've cc'd him in case he has any 
additional insight or perspective that may be useful.

Unfortunately this does not provide a solution to the 2nd problem, and 
currently it is not possible to query labels from within a container. I 
think Steve's suggestion of a simple shell tool to query the containers 
package manager(s) and produce a report is probably the right way to go: 
but we should draw up a specification that scoped what data we collected 
in such a manifest as if we simply do the equivalent of 'rpm -qa' then I 
think Paul's point is valid and we don't gain much from the exercise.



On Fri, Nov 18, 2016 at 11:51 AM, Steven Dake (stdake) <stdake at cisco.com> 

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 

Perhaps someone has a better solution?


From: "zhu.zeyu at zte.com.cn" <zhu.zeyu at zte.com.cn>
Date: Friday, November 18, 2016 at 1:56 AM
To: Steven Dake <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


Pete Birley / Director 
pete at port.direct / +447446862551
United Kingdom 

This e-mail message may contain confidential or legally privileged 
information and is intended only for the use of the intended recipient(s). 
Any unauthorized disclosure, dissemination, distribution, copying or the 
taking of any action in reliance on the information herein is prohibited. 
E-mails are not secure and cannot be guaranteed to be error free as they 
can be intercepted, amended, or contain viruses. Anyone who communicates 
with us by e-mail is deemed to have accepted these risks. Port.direct is 
not responsible for errors or omissions in this message and denies any 
responsibility for any damage arising from the use of e-mail. Any opinion 
and other statement contained in this message and any attachment are 
solely those of the author and do not necessarily represent those of the 
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe

More information about the OpenStack-dev mailing list