Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --format to docker version #14186

Closed
phemmer opened this issue Jun 25, 2015 · 0 comments
Closed

Add --format to docker version #14186

phemmer opened this issue Jun 25, 2015 · 0 comments

Comments

@phemmer
Copy link
Contributor

phemmer commented Jun 25, 2015

Continuation of discussion here and here.

The docker version command should have a --format flag for controlling output. With the formatting change introduced in #10934, it becomes much more difficult to extract a specific field, as each output line does not indicate whether it is for the client or server.
Instead of having to do tricky things with grep awk or other utilities, it would be cleaner to have a --format flag to extract a specific field.

For example:

# docker version --format='{{.Server.GitCommit}}'
0baf609

I think it would also be good to get this implemented before the next release now that #14047 has been merged since #14047 will break any tools that used the previous output format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant