Skip to content

Conversation

@dvdksn
Copy link
Contributor

@dvdksn dvdksn commented Apr 12, 2024

- What I did

Moves the cli.md file to become the docker.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)

@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.48%. Comparing base (1dee86b) to head (dc22572).

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           

@dvdksn dvdksn marked this pull request as ready for review April 12, 2024 13:52
@dvdksn dvdksn requested a review from thaJeztah as a code owner April 12, 2024 13:52
@dvdksn dvdksn force-pushed the cli-reference-overview-base-cmd branch from 81ae886 to c220581 Compare May 27, 2024 12:35
@dvdksn dvdksn force-pushed the cli-reference-overview-base-cmd branch from c220581 to 719f88e Compare July 2, 2024 13:22
@dvdksn dvdksn requested a review from a team as a code owner July 2, 2024 13:22
@dvdksn dvdksn force-pushed the cli-reference-overview-base-cmd branch from 719f88e to eca29b5 Compare July 3, 2024 06:30
@dvdksn dvdksn requested a review from thaJeztah July 3, 2024 06:31
@dvdksn dvdksn force-pushed the cli-reference-overview-base-cmd branch from eca29b5 to 218fbf8 Compare July 3, 2024 06:34
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Comment on lines +91 to +178
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
Copy link
Member

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
<...>
```.

@thaJeztah thaJeztah added this to the 28.0.0 milestone Jul 3, 2024
dvdksn added 8 commits July 4, 2024 10:28
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@dvdksn dvdksn force-pushed the cli-reference-overview-base-cmd branch from 218fbf8 to dc22572 Compare July 4, 2024 08:31
@dvdksn dvdksn merged commit 9bb1a62 into docker:master Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants