mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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)
This commit is contained in:
@@ -96,6 +96,19 @@ Replace `ghcr.io/coder/coder:latest` in the `docker run` command in the
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Cannot connect to the Docker daemon
|
||||||
|
|
||||||
|
If you see an error like:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
|
||||||
|
```
|
||||||
|
|
||||||
|
Docker is not installed or not running on the host. Install Docker and start the
|
||||||
|
daemon before creating a workspace from a Docker-based template. Refer to the
|
||||||
|
[quickstart troubleshooting](../tutorials/quickstart.md#cannot-connect-to-the-docker-daemon)
|
||||||
|
for platform-specific steps.
|
||||||
|
|
||||||
### Docker-based workspace is stuck in "Connecting..."
|
### Docker-based workspace is stuck in "Connecting..."
|
||||||
|
|
||||||
Ensure you have an externally-reachable `CODER_ACCESS_URL` set. See
|
Ensure you have an externally-reachable `CODER_ACCESS_URL` set. See
|
||||||
|
|||||||
@@ -257,48 +257,69 @@ advanced capabilities that Coder offers.
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Cannot connect to the Docker daemon on Linux
|
### Cannot connect to the Docker daemon
|
||||||
|
|
||||||
|
When creating a workspace from a Docker template, you may see an error like:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
|
Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Install Docker for your system, if you haven't already done so:
|
This means Docker is either not installed or not running on the machine where
|
||||||
|
Coder is running. Docker must be running before you create a workspace from a
|
||||||
|
Docker-based template.
|
||||||
|
|
||||||
|
<div class="tabs">
|
||||||
|
|
||||||
|
#### macOS
|
||||||
|
|
||||||
|
1. If Docker Desktop is not installed,
|
||||||
|
[install it](https://docs.docker.com/desktop/setup/install/mac-install/) or
|
||||||
|
use Homebrew:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
brew install --cask docker-desktop
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Open Docker Desktop and verify that it is running.
|
||||||
|
|
||||||
|
#### Linux
|
||||||
|
|
||||||
|
1. Install Docker, if you haven't already:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -sSL https://get.docker.com | sh
|
curl -sSL https://get.docker.com | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Set up the Docker daemon in rootless mode for your user to run Docker as a
|
1. Start the Docker daemon:
|
||||||
non-privileged user:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dockerd-rootless-setuptool.sh install
|
sudo systemctl start docker
|
||||||
```
|
```
|
||||||
|
|
||||||
Depending on your system's dependencies, you might need to run other commands
|
1. Assign your user to the `docker` group so Coder can access the daemon
|
||||||
before you retry this step. Read the output of this command for further
|
without root:
|
||||||
instructions.
|
|
||||||
|
|
||||||
1. Assign your user to the Docker group:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo usermod -aG docker $USER
|
sudo usermod -aG docker $USER
|
||||||
|
newgrp docker
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Confirm that the user has been added:
|
1. Confirm the group membership:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ groups
|
$ groups
|
||||||
docker sudo users
|
docker sudo users
|
||||||
```
|
```
|
||||||
|
|
||||||
- Ubuntu users might not see the group membership update. In that case, run
|
#### Windows
|
||||||
the following command or reboot the machine:
|
|
||||||
|
|
||||||
```shell
|
1. If Docker Desktop is not installed,
|
||||||
newgrp docker
|
[install it](https://docs.docker.com/desktop/install/windows-install/).
|
||||||
```
|
|
||||||
|
1. Open Docker Desktop and verify that it is running.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
### Can't start Coder server: Address already in use
|
### Can't start Coder server: Address already in use
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user