docs: add deprecation notice for --kernel-memory flag#6922
docs: add deprecation notice for --kernel-memory flag#6922mohithshuka wants to merge 1 commit intodocker:masterfrom
Conversation
Fixes #24643 --kernel-memory was deprecated in v20.10 and removed in v23.0. Add deprecation callouts to both the options table and the Kernel memory constraints section of the run reference page.
There was a problem hiding this comment.
Pull request overview
Adds explicit documentation deprecation messaging for the docker run --kernel-memory flag, aligning the run reference page with the feature’s deprecation/removal timeline.
Changes:
- Marked
--kernel-memoryas Deprecated in the runtime constraints options table. - Added a deprecation callout to the “Kernel memory constraints” section describing deprecation/removal and linking to the deprecated features page.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `--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. | |
There was a problem hiding this comment.
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+).
| > **Deprecated** | ||
| > |
There was a problem hiding this comment.
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.
| > 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. |
There was a problem hiding this comment.
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.
Fixes #24643
The
--kernel-memoryflag was deprecated in Docker v20.10 and removedin Docker v23.0, but the run reference page had no deprecation notice.
Changes
**Deprecated**notice to the--kernel-memoryrow in theoptions table
### Kernel memory constraintssection explaining:kmem.limit_in_bytesin v5.4