Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ container:
| `-m`, `--memory=""` | Memory limit (format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. Minimum is 6M. |
| `--memory-swap=""` | Total memory limit (memory + swap, format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. |
| `--memory-reservation=""` | Memory soft limit (format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. |
| `--kernel-memory=""` | Kernel memory limit (format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. Minimum is 4M. |
| `--kernel-memory=""` | **Deprecated**: Kernel memory limit. Deprecated in Docker v20.10, and removed in Docker v23.0. This option is ignored when set. |
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

In the options table, the new wording drops the original value format/unit details and states unconditionally that the option is ignored when set. That’s potentially misleading: older Engine versions may still honor the limit, while newer Engines ignore it (and newer CLIs may remove the flag entirely). Consider keeping the original format guidance and scoping the “ignored” behavior to the specific Engine/API versions where it applies (e.g., Engine v23.0+/API v1.42+).

Copilot uses AI. Check for mistakes.
| `-c`, `--cpu-shares=0` | CPU shares (relative weight) |
| `--cpus=0.000` | Number of CPUs. Number is a fractional number. 0.000 means no limit. |
| `--cpu-period=0` | Limit the CPU CFS (Completely Fair Scheduler) period |
Expand Down Expand Up @@ -502,6 +502,15 @@ less likely to be killed, and positive scores more likely.

### Kernel memory constraints

> **Deprecated**
>
Comment on lines +505 to +506
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

This deprecation notice uses a custom blockquote header (> **Deprecated**), but this doc (and others in the repo) generally use the standard admonition syntax (> [!NOTE], > [!IMPORTANT], > [!WARNING]) for callouts. Using the standard admonition form here would keep rendering and styling consistent across the docs site.

Copilot uses AI. Check for mistakes.
> The `--kernel-memory` option was deprecated in Docker v20.10 and removed in
> Docker v23.0. The Linux kernel deprecated `kmem.limit_in_bytes` in kernel
> v5.4, and OCI runtimes such as runc no longer support this option. Docker API
> v1.42 and later ignores this option when set. Do not use `--kernel-memory` in
> new configurations. For more details, see the
> [Deprecated features](https://docs.docker.com/engine/deprecated/) page.
Comment on lines +507 to +512
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The callout says --kernel-memory was removed in Docker v23.0 / ignored by API v1.42+, but the section immediately below still presents --kernel-memory usage and examples as current guidance. To avoid confusing readers, consider explicitly labeling the remainder of this section/examples as legacy (Engine <= 20.10) or removing/updating the examples to reflect that the flag is deprecated/ignored.

Copilot uses AI. Check for mistakes.

Kernel memory is fundamentally different than user memory as kernel memory can't
be swapped out. The inability to swap makes it possible for the container to
block system services by consuming too much kernel memory. Kernel memory includes:
Expand Down
Loading