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
24 changes: 24 additions & 0 deletions content/manuals/engine/install/linux-postinstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,30 @@ $ sudo systemctl disable docker.service
$ sudo systemctl disable containerd.service
```

If you installed Docker from [binaries](binaries.md), the systemd service files
aren't included. It is recommended to create the Docker service file manually so
Docker starts automatically on boot. The `dockerd` daemon manages containerd
directly, so a separate containerd service is not required.

```console
$ sudo tee /etc/systemd/system/docker.service > /dev/null <<'EOF'
[Unit]
Description=Docker Application Container Engine
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/dockerd
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now docker.service
```

You can use systemd unit files to configure the Docker service on startup,
for example to add an HTTP proxy, set a different directory or partition for the
Docker runtime files, or other customizations. For an example, see
Expand Down