-
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update the runtime configuration section #4344
Conversation
ed75b50
to
b3c8d63
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4344 +/- ##
==========================================
- Coverage 59.29% 59.29% -0.01%
==========================================
Files 288 288
Lines 24769 24769
==========================================
- Hits 14688 14687 -1
- Misses 9197 9198 +1
Partials 884 884 |
31dce4b
to
9760f3f
Compare
9760f3f
to
02ea3ae
Compare
1289063
to
9381bc4
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.
Looking good! Just needs a couple of tweaks first
9381bc4
to
5d4fc39
Compare
Thanks @corhere and @thaJeztah, I've addressed the comments, hopefully we can merge now |
@thaJeztah this needs to be backported to 24.0 as well (features are 23.0 and 24.0, nothing new in 25.0) |
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.
Left some comments (sorry!) but not all of them are show-stoppers, so feel free to leave some for follow-ups (the anchor ones may be relevant if you need to link to these sections from elsewhere and if we don't want to update those links "again")
configuration section in | ||
[CRI Plugin Config Guide](https://github.com/containerd/containerd/blob/main/docs/cri/config.md#full-configuration). | ||
|
||
##### Configure runc drop-in replacements |
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.
Probably for a follow-up; we don't use the regular template for this page (yet), but perhaps we should already add the anchor (and maybe manually create an Options
table with links);
##### Configure runc drop-in replacements | |
##### <a name="add-runtime"></a> Configure runc drop-in replacements (--add-runtime) |
For an example configuration for a runc drop-in replacment, see | ||
[Alternative container runtimes > youki](https://docs.docker.com/engine/alternative-runtimes/#youki) | ||
|
||
##### Configure the default container runtime |
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.
##### Configure the default container runtime | |
##### <a name="default-runtime"></a> Configure the default container runtime (--default-runtime) |
By default, the Docker daemon automatically starts `containerd`. If you want to | ||
control `containerd` startup, manually start `containerd` and pass the path to | ||
the `containerd` socket using the `--containerd` flag. For example: |
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.
This is not entirely true; automatic starting is mostly still there for backward-compatibility (and debugging), but the daemon will first check if /run/containerd/containerd.sock
(default location for containerd's socket) is present. If that's not the case, it assumes containerd
is not managed / running as a service, and it falls back to starting its own instance.
An unfortunate side-effect of that is that if (for any reason) the containerd
service is not (or not YET) running, dockerd
will start its own instance, which uses it's own storage location (different from the default) and other options. This can also lead to 2 instances of containerd running on the host (if the actual containerd
service is started).
Setting the --containerd
socket helps with such situations (race conditions, or containerd not running where it should be), as it disables the feature that automatically starts a new instance. This is also why we added this option as a default in the systemd unit we ship for docker engine; see
(I should mention that that there's things being discussed in this area, and we may consider using different defaults, and/or to make "starting containerd" an opt-in option (instead of opt-out)).
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.
OK, this is quite good information. I didn't actually change this section when updating the doc; I only moved it around. So for that reason (and because this is still under discussion) I will leave it as is for now.
|
||
The `native.cgroupdriver` option specifies the management of the container's | ||
cgroups. You can only specify `cgroupfs` or `systemd`. If you specify | ||
#### Use a manually controlled containerd daemon |
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.
#### Use a manually controlled containerd daemon | |
#### <a name="containerd"></a> Use a manually controlled containerd daemon (--containerd) |
(see my other comment) not sure if "manually controlled" is the right wording here; this option would usually be if containerd is running as its own service (which is the default nowadays).
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.
"Run containerd standalone"?
By default, the Docker daemon automatically starts `containerd`. If you want to | ||
control `containerd` startup, manually start `containerd` and pass the path to | ||
the `containerd` socket using the `--containerd` flag. For example: | ||
#### Configure container runtimes |
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.
#### Configure container runtimes | |
#### <a name="runtime"></a> Configure container runtimes (--runtime) |
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 don't have time for a complete review yet, but I'd like to register my intention to dig in to this in the next day or so and provide feedback.
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
5d4fc39
to
6c7d17f
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!
relates to: docker/docs#17517
- What I did
Updated the section about runtime options, it now includes how to configure
containerd shims using the
runtimeType
andoptions
fields.Because there are now two ways to configure runtimes, it also demanded that I
refactor the entire section.
I've tried to add justification for when to use
runtimeType
, and when to usepath
. It's quite difficult to accurately capture the distinction, while alsokeeping the section somewhat intelligible. I tried.
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
馃尛