Skip to content

Commit e17b47f

Browse files
blink-so[bot]M Atif Alimatifali
authored
docs: restructure docker installation with tabs (#19567)
Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: M Atif Ali <U04T3LN8ASU+atif@users.noreply.github.com> Co-authored-by: Atif Ali <atif@coder.com>
1 parent 40df21e commit e17b47f

File tree

1 file changed

+33
-29
lines changed

1 file changed

+33
-29
lines changed

docs/install/docker.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,38 @@ You can install and run Coder using the official Docker images published on
1313

1414
- 2 CPU cores and 4 GB memory free on your machine.
1515

16+
<div class="tabs">
17+
18+
## Install Coder via `docker compose`
19+
20+
Coder publishes a
21+
[docker compose example](https://github.com/coder/coder/blob/main/compose.yaml)
22+
which includes a PostgreSQL container and volume.
23+
24+
1. Make sure you have [Docker Compose](https://docs.docker.com/compose/install/)
25+
installed.
26+
27+
1. Download the
28+
[`docker-compose.yaml`](https://github.com/coder/coder/blob/main/compose.yaml)
29+
file.
30+
31+
1. Update `group_add:` in `docker-compose.yaml` with the `gid` of `docker`
32+
group. You can get the `docker` group `gid` by running the below command:
33+
34+
```shell
35+
getent group docker | cut -d: -f3
36+
```
37+
38+
1. Start Coder with `docker compose up`
39+
40+
1. Visit the web UI via the configured url.
41+
42+
1. Follow the on-screen instructions log in and create your first template and
43+
workspace
44+
45+
Coder configuration is defined via environment variables. Learn more about
46+
Coder's [configuration options](../admin/setup/index.md).
47+
1648
## Install Coder via `docker run`
1749

1850
### Built-in database (quick)
@@ -47,35 +79,7 @@ docker run --rm -it \
4779
ghcr.io/coder/coder:latest
4880
```
4981

50-
## Install Coder via `docker compose`
51-
52-
Coder's publishes a
53-
[docker compose example](https://github.com/coder/coder/blob/main/compose.yaml)
54-
which includes an PostgreSQL container and volume.
55-
56-
1. Make sure you have [Docker Compose](https://docs.docker.com/compose/install/)
57-
installed.
58-
59-
1. Download the
60-
[`docker-compose.yaml`](https://github.com/coder/coder/blob/main/compose.yaml)
61-
file.
62-
63-
1. Update `group_add:` in `docker-compose.yaml` with the `gid` of `docker`
64-
group. You can get the `docker` group `gid` by running the below command:
65-
66-
```shell
67-
getent group docker | cut -d: -f3
68-
```
69-
70-
1. Start Coder with `docker compose up`
71-
72-
1. Visit the web UI via the configured url.
73-
74-
1. Follow the on-screen instructions log in and create your first template and
75-
workspace
76-
77-
Coder configuration is defined via environment variables. Learn more about
78-
Coder's [configuration options](../admin/setup/index.md).
82+
</div>
7983

8084
## Install the preview release
8185

0 commit comments

Comments
 (0)