Skip to content

Commit cfce751

Browse files
authored
docs(docs): improve Docker daemon troubleshooting for all platforms (#24922)
Improves the Docker daemon troubleshooting in the quickstart and Docker install docs: - Renames the quickstart entry from "Cannot connect to the Docker daemon on Linux" to cover all platforms. - Adds a plain-English explanation of what the error means (Docker is not installed or not running). - Adds tabbed macOS/Linux/Windows instructions to the quickstart (macOS and Windows were missing). - Simplifies the Linux steps to match what Step 1 of the quickstart already teaches. - Adds a matching entry to `docs/install/docker.md` with a cross-link to the quickstart for platform-specific steps. Supersedes #24907 which was closed without merging. Fixes https://linear.app/codercom/issue/DEVREL-23 > Generated with [Coder Agents](https://coder.com/agents)
1 parent f6779af commit cfce751

2 files changed

Lines changed: 50 additions & 16 deletions

File tree

docs/install/docker.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ Replace `ghcr.io/coder/coder:latest` in the `docker run` command in the
9696

9797
## Troubleshooting
9898

99+
### Cannot connect to the Docker daemon
100+
101+
If you see an error like:
102+
103+
```text
104+
Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
105+
```
106+
107+
Docker is not installed or not running on the host. Install Docker and start the
108+
daemon before creating a workspace from a Docker-based template. Refer to the
109+
[quickstart troubleshooting](../tutorials/quickstart.md#cannot-connect-to-the-docker-daemon)
110+
for platform-specific steps.
111+
99112
### Docker-based workspace is stuck in "Connecting..."
100113

101114
Ensure you have an externally-reachable `CODER_ACCESS_URL` set. See

docs/tutorials/quickstart.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -257,48 +257,69 @@ advanced capabilities that Coder offers.
257257

258258
## Troubleshooting
259259

260-
### Cannot connect to the Docker daemon on Linux
260+
### Cannot connect to the Docker daemon
261+
262+
When creating a workspace from a Docker template, you may see an error like:
261263

262264
```text
263265
Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
264266
```
265267

266-
1. Install Docker for your system, if you haven't already done so:
268+
This means Docker is either not installed or not running on the machine where
269+
Coder is running. Docker must be running before you create a workspace from a
270+
Docker-based template.
271+
272+
<div class="tabs">
273+
274+
#### macOS
275+
276+
1. If Docker Desktop is not installed,
277+
[install it](https://docs.docker.com/desktop/setup/install/mac-install/) or
278+
use Homebrew:
267279

268280
```shell
269-
curl -sSL https://get.docker.com | sh
281+
brew install --cask docker-desktop
270282
```
271283

272-
1. Set up the Docker daemon in rootless mode for your user to run Docker as a
273-
non-privileged user:
284+
1. Open Docker Desktop and verify that it is running.
285+
286+
#### Linux
287+
288+
1. Install Docker, if you haven't already:
274289

275290
```shell
276-
dockerd-rootless-setuptool.sh install
291+
curl -sSL https://get.docker.com | sh
277292
```
278293

279-
Depending on your system's dependencies, you might need to run other commands
280-
before you retry this step. Read the output of this command for further
281-
instructions.
294+
1. Start the Docker daemon:
282295

283-
1. Assign your user to the Docker group:
296+
```shell
297+
sudo systemctl start docker
298+
```
299+
300+
1. Assign your user to the `docker` group so Coder can access the daemon
301+
without root:
284302

285303
```shell
286304
sudo usermod -aG docker $USER
305+
newgrp docker
287306
```
288307

289-
1. Confirm that the user has been added:
308+
1. Confirm the group membership:
290309

291310
```console
292311
$ groups
293312
docker sudo users
294313
```
295314

296-
- Ubuntu users might not see the group membership update. In that case, run
297-
the following command or reboot the machine:
315+
#### Windows
316+
317+
1. If Docker Desktop is not installed,
318+
[install it](https://docs.docker.com/desktop/install/windows-install/).
298319

299-
```shell
300-
newgrp docker
301-
```
320+
1. Open Docker Desktop and verify that it is running.
321+
322+
</div>
302323

303324
### Can't start Coder server: Address already in use
304325

0 commit comments

Comments
 (0)