-
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
docs: refactor cli run reference #4615
Conversation
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.
just some quick comments
b59f6d1
to
0d1582e
Compare
22e4d2b
to
d06e3a7
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4615 +/- ##
==========================================
- Coverage 59.77% 59.68% -0.09%
==========================================
Files 287 287
Lines 24830 24865 +35
==========================================
Hits 14841 14841
- Misses 9103 9138 +35
Partials 886 886 |
1dfbda9
to
43dda63
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.
I'm gonna take a break for a bit; I looked at commits until "docs: rewrite section on overriding image defaults"
Most comments are probably for follow-ups, but some could be part of this PR (for some follow-ups we may want to create tracking tickets)
docs/reference/run.md
Outdated
```console | ||
$ docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...] | ||
``` |
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 sure if this gets removed in a later commit, and not a show-stopper in any way, but it just occurred to me that this "usage" output may add to the confusion around docker run reference
vs run
(command) reference, as both outline the USAGE
The default init process used is the first `docker-init` executable found in the | ||
system path of the Docker daemon process. This `docker-init` binary, included in | ||
the default installation, is backed by [tini](https://github.com/krallin/tini). | ||
|
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.
For a follow-up; I think the init-binary to use is configurable on the daemon (if so, we may need a link to that part of the daemon config)
## <a name="cgroup-parent"></a> Specify custom cgroups | ||
|
||
Using the `--cgroup-parent` flag, you can pass a specific cgroup to run a | ||
container in. This allows you to create and manage cgroups on their own. You can | ||
define custom resources for those cgroups and put containers under a common | ||
parent group. |
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.
For a follow-up; this section may need a rewrite (but it's pretty-much "power-user" area). There's some (not so) subtle issues with group-parent when using cgroups v2, besides currently this section doesn't describe at all how to use it 😞 (We may have a tracking issue for that somewhere, but not sure if it's still open)
ad6338d
to
01dbbf0
Compare
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]>
Create an easier to digest introduction to container networking, move the bulk of information to the networking overview page. 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]>
Signed-off-by: David Karlsson <[email protected]>
Signed-off-by: David Karlsson <[email protected]>
01dbbf0
to
99072a2
Compare
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]>
99072a2
to
2e394eb
Compare
Signed-off-by: David Karlsson <[email protected]>
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!!
Docker supports two main categories of mounts: | ||
|
||
- Volume mounts | ||
- Bind mounts |
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.
Related to my previous comment. Looks like this section is not as complete as https://docs.docker.com/storage/, and misses at least the tmpfs
mounts.
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 I didn't intend to make everything on this page exhaustive; it could put us back where this page started. My thinking is:
- General information here
- All the details in the reference docs
The range of ports are within an *ephemeral port range* defined by | ||
`/proc/sys/net/ipv4/ip_local_port_range`. Use the `-p` flag to explicitly map a | ||
single port or range of ports. |
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.
Thanks! Sorry for being picky on that one, but I know it's been troublesome in the past, so trying to preserve the information.
Related to that, I need to check with @akerouanton and @robmry what options we currently have to influence these; I know there's some ports used by Windows itself that are within the ephemeral port range, and I know there's been issues with Swarm services picking their own range(s).
Perhaps we need configuration options for this on the daemon (not just a "range", but also options to exclude range(s) or individual ports from being used).
> If you don't specify an IP address (i.e., `-p 80:80` instead of `-p | ||
> 127.0.0.1:80:80`) when publishing a container's ports, Docker publishes the |
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.
Also for a follow-up; we need to make a pass at reviewing examples like this in light of IPv6 (i.e., both 127.0.0.x
and ::1
becoming more relevant). /cc @akerouanton @robmry
- What I did
Improving & consolidating the
docker run
reference instructions.docs/reference/run.md
Make this a conceptual/introductory page for understanding how
docker run
works, and the different options at a very high level.docs/reference/commandline/run.md
Make this the canonical page for looking up the different flags/options for the
docker run
command.Related:
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)