Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit 66a6891

Browse files
committed
add sample compose file
1 parent 68aa611 commit 66a6891

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

setup/docker.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,40 @@ multi-machine scaling.
158158

159159
For organizations, we recommend one Docker host per team of 5-10 developers.
160160

161+
## Docker Compose
162+
163+
For a convenent way to run Coder in Docker, you can use [Docker Compose](https://docs.docker.com/compose/).
164+
165+
Simply create a new directory (for example, named `c4d`) and place the following
166+
content in a file named `docker-compose.yml`:
167+
168+
```yaml
169+
170+
version: "3.5"
171+
services:
172+
coder:
173+
image: docker.io/codercom/coder:1.28.2
174+
container_name: coderd
175+
restart: unless-stopped
176+
ports:
177+
- 7080:7080/tcp
178+
volumes:
179+
- /var/run/docker.sock:/var/run/docker.sock
180+
- ${HOME}/.coder:/var/run/coder
181+
182+
```
183+
184+
Then, navigate to that folder in your terminal and run the command:
185+
186+
```shell-session
187+
188+
docker-compose up -d
189+
190+
```
191+
192+
Coder will now run in the background! For more detailed information on the
193+
Docker Compose file, please see [Docker's website](https://docs.docker.com/compose/compose-file/compose-file-v3/).
194+
161195
## Known issues
162196

163197
Currently, Coder for Docker does not support:

0 commit comments

Comments
 (0)