-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
cli reference overview base cmd #5010
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5010 +/- ##
=======================================
Coverage 61.48% 61.48%
=======================================
Files 298 298
Lines 20814 20814
=======================================
Hits 12797 12797
Misses 7105 7105
Partials 912 912 |
81ae886
to
c220581
Compare
c220581
to
719f88e
Compare
719f88e
to
eca29b5
Compare
eca29b5
to
218fbf8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
You can specify options like `-a=[]` multiple times in a single command line, | ||
for example in these commands: | ||
|
||
```console | ||
$ docker run -a stdin -a stdout -i -t ubuntu /bin/bash | ||
|
||
$ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but we need to look at some of these; -a
/ --attach
is shown as list
, and those can take multiple values, but for other flags, Cobra is good at silently ignoring duplicates, and in that case overriding previous values. (e.g. -i -i=false -i=true -i
)
Also for a follow-up, we should pick a different example than -a
, as it's really more of an "expert" use-case to set that. Perhaps something like -e
/ --env
or something common could be a good one to pick as example (the --env
one can be nice as we could show the result;
$ docker run --rm -e ENV_ONE=one -e ENV_TWO=two alpine printenv
ENV_ONE=one
ENV_TWO=two
<...>
```.
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
218fbf8
to
dc22572
Compare
- What I did
Moves the
cli.md
file to become thedocker.md
base command reference.This file contains a lot of information about how the CLI and its flags work, base flags, configuration file, and environment variables. I think it makes more sense to have it on the base command page than in a separate place.
Needs:
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)