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
docker: simplify examples #2597
Conversation
@@ -4,36 +4,36 @@ | |||
|
|||
- List currently running docker containers: | |||
|
|||
`docker container ls` | |||
`docker ps` |
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.
Was this meant to be ls
instead of ps
?
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.
Nope, that's the actual command. I assume it's one of the many reasons why they did the CLI restructure, adding in the newer sub-commands like container
, image
, etc.
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.
I see. If the container
commands are newer, why are we changing the page to the older commands? I'm confused.
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.
@sbrl, see #2592. Looks like the short commands were going to be removed, but then most people tend to use the short commands. It looks like @MasterOdin was thinking of using additional pages for the long commands. So docker-container
, etc.
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.
Ah, I see. This change is ok then :-)
Maybe once those pages are done we can revisit and add a See also
.
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.
Yeah, it's kind of a weird spot Docker is in. They added a bunch of sub-commands (container, image, etc.) to allow adding a lot more commands for those specific actions, but left the top level largely alone. As such, while all of the top level commands do have an equivalent action within a sub-command, most docs and things really just use these handful of key top level commands still.
@MasterOdin - Could you remove one example from the page so that we are under our budget of 8 ? |
Hi all! This thread has not had any recent activity. Are there any updates? Thanks! |
Removed a 9th example from the file, but I'm a bit conflicted. Would it be appropriate to add a |
Is the command mandatory, @MasterOdin? Is it the most common use case? |
It's not mandatory and if not included, a default command will be executed by the developer of the Dockerfile. The most common usecase would be to not include the command though. |
Perhaps we should leave it off then. If it isn't commonly used, then I think it's better left to a more in-depth guide or tutorial :-) |
common/
,linux/
, etc.)This is the first of PRs that is attached to the raised issue #2592, reverting the changes of #1505 to the more common real-world suggested usage, with the intent to create further docker command specific pages.
I'm not sure how you'd want to handle the fact that it has 9 examples though. You could probably merge the two run examples, but not sure how to specify an optional
{{command}}
parameter.