Skip to content

docs: add environment variables configuration method for Docker daemon#25075

Open
mohithshuka wants to merge 3 commits into
docker:mainfrom
mohithshuka:fix/sbx-ubuntu-install-suites
Open

docs: add environment variables configuration method for Docker daemon#25075
mohithshuka wants to merge 3 commits into
docker:mainfrom
mohithshuka:fix/sbx-ubuntu-install-suites

Conversation

@mohithshuka
Copy link
Copy Markdown
Contributor

What changed

Added a new "Configuration using environment variables" section to the
Docker daemon configuration overview page.

Why

The page stated there are "two ways" to configure the Docker daemon
(JSON file and flags) but was missing the environment variables method
using systemd drop-in overrides.

Fixes #25062

Testing

  • Verified the new section renders correctly in markdown
  • No broken links introduced

mohithshuka added 3 commits May 15, 2026 16:36
The previous description said 'optimize your repository storage' which
was vague and did not reflect the page's actual content. The manage.md
page is focused on viewing, filtering, and deleting images and image
indexes. Updated the description to accurately reflect this.

Fixes docker#25005
The daemon configuration overview only mentioned two methods (JSON file
and flags) but was missing the environment variables method via systemd.
Added a new section explaining how to use systemd drop-in overrides to
set daemon environment variables.

Fixes docker#25062
@mohithshuka mohithshuka requested a review from dvdksn as a code owner May 16, 2026 18:17
Copilot AI review requested due to automatic review settings May 16, 2026 18:17
@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 93dc361
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a08b4ad90bd660008d89425
😎 Deploy Preview https://deploy-preview-25075--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the area/engine Issue affects Docker engine/daemon label May 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Addresses issue #25062 by expanding the Docker daemon configuration overview to mention environment variables as an additional configuration method, and adds a new "Configuration using environment variables" section showing a systemd drop-in example.

Changes:

  • Updates the intro list from "two ways" to "three ways" and adds an environment-variables bullet.
  • Adds a new section demonstrating systemctl edit docker with an Environment="DOCKER_OPTS=..." drop-in and a reload/restart sequence.
Comments suppressed due to low confidence (3)

content/manuals/engine/daemon/_index.md:49

  • The list now describes three configuration methods, but the sentence below still says "both of these options together," which only refers to two. This should be updated to reflect that three methods exist (e.g., "You can combine these options...") and clarify how environment variables interact with the JSON file and flags.
You can use both of these options together as long as you don't specify the same
option both as a flag and in the JSON file. If that happens, the Docker daemon
won't start and prints an error message.

content/manuals/engine/daemon/_index.md:113

  • The opening fence uses 6 backticks while the closing fence uses 5, so the code block is unbalanced and will not render correctly. Use matching fences (typically 3 backticks) on both sides.
``````ini
[Service]
Environment="DOCKER_OPTS=--debug --tls=true"
**content/manuals/engine/daemon/_index.md:120**
* The opening fence uses 4 backticks while the closing fence uses 3, leaving the code block unbalanced. Use matching fences on both ends.
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
```
```
</details>



---

💡 <a href="/docker/docs/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

Comment on lines +104 to +106
````````console
$ sudo systemctl edit docker
```````
Comment on lines +96 to +120
### Configuration using environment variables

You can configure the Docker daemon using environment variables. This is useful
in systemd service overrides or init scripts.

To set environment variables for the Docker daemon using systemd, create a
drop-in override file:

````````console
$ sudo systemctl edit docker
```````

Add the following:

``````ini
[Service]
Environment="DOCKER_OPTS=--debug --tls=true"
`````

Then reload and restart the daemon:

````console
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
```
- Use a JSON configuration file. This is the preferred option, since it keeps
all configurations in a single place.
- Use flags when starting `dockerd`.
- Use environment variables to set daemon options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine Issue affects Docker engine/daemon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs-scanner] Daemon configuration overview incomplete - missing environment variables method

2 participants