RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1381929 - docker-images and docker-inspect man pages lacks simple --format example
Summary: docker-images and docker-inspect man pages lacks simple --format example
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Antonio Murdaca
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-05 11:34 UTC by Marek Haicman
Modified: 2019-03-06 01:10 UTC (History)
5 users (show)

Fixed In Version: docker-1.12.6-1.el7_3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-02 19:09:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0406 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2017-03-03 00:06:50 UTC

Description Marek Haicman 2016-10-05 11:34:48 UTC
Description of problem:
As a user of Docker, I was stuck how to form --format field, for `docker images' command. There is no example, only a mention of "go template". As my use case was to create very simple formatting [reduce field to one], all I needed was example like the one in `man docker ps', nothing complex.

docker ps --format "{{.ID}}: {{.Command}}"

In the case of "man docker-inspect", there is one example, but is quite complex.

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

How reproducible:
always

Steps to Reproduce:
1. man docker images


Actual results:
Go template is mentioned, but no example provided

Expected results:
At least some very simple example is there, so admin without experience with Go language can do simple formatting immediately.

Additional info:
Other man pages lack simple example of formatting, but it's probably not necessary to update them, as these are advanced commands:
man docker-network-inspect (golang.org reference is explicit)
man docker-volume-inspect (golang.org reference is explicit)

Comment 2 William Henry 2016-11-22 23:42:05 UTC
sudo docker images --format "{{.ID}}: {{.Tag}}\t{{.Repository}}"

Is a good example. I will try to add it.

Comment 3 William Henry 2016-11-23 06:39:58 UTC
Added an example to docker/man/docker-images.1.md

PR:
https://github.com/docker/docker/pull/28734

Comment 4 William Henry 2016-11-28 20:02:10 UTC
 At github docker/docker:

added this to the 1.13.0 milestone
merged commit 60e72ea into docker:master

Comment 5 William Henry 2016-11-29 23:22:44 UTC
Marek,

I've fixed the 'docker images --format' example upstream. Have you looked at that? Is it enough?

https://github.com/docker/docker/pull/28734

As you pointed out the inspect has examples already and also the inspect structure is more complex so the examples try to show how to find some of the deeper level elements.  Is it intuitive enough or is a simpler example still required?

Dan, any thoughts?


William

Comment 6 Daniel Walsh 2016-11-30 13:31:44 UTC
Looks good to me.

Fixed in docker-1.13 or docker-latest-1.13.

Comment 7 Marek Haicman 2016-12-08 18:56:02 UTC
I think these examples are perfect, thanks!

Comment 10 Antonio Murdaca 2017-01-10 13:27:02 UTC
Backported to docker-1.12.5 branch, Lokesh could you rebuild for RHEL so QE can re-test this out again?

Comment 12 Lokesh Mandvekar 2017-01-18 15:19:41 UTC
will be shipped in 7.3.3

Comment 14 Luwen Su 2017-02-16 09:02:17 UTC
Via docker-1.12.6-5.el7.x86_64, move to verified

Comment 16 errata-xmlrpc 2017-03-02 19:09:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0406.html


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