Add Instructions to run Dockge
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
# Dockge
|
||||||
|
To manage our containers, we'll rely on docker compose and use `Dockge` to manage those composes or "stacks".
|
||||||
|
Dockge is lightweight, doesn't use any databases and relies solely on compose.yaml files.
|
||||||
|
This gives me the opportunity to better learn to design and understand Docker components without abstracting them away.
|
||||||
|
It also stores all compose files locally in plaintext which helps if I ever want to migrate away from Dockge.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
We'll create a dedicated folder for Dockge inside our directory dedicated to Docker containers:
|
||||||
|
```bash
|
||||||
|
mkdir -p /opt/appdata/dockge
|
||||||
|
cd /opt/appdata/dockge
|
||||||
|
```
|
||||||
|
Next we'll define its compose.yaml file.
|
||||||
|
```bash
|
||||||
|
nano compose.yaml
|
||||||
|
```
|
||||||
|
And paste the following into it:
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
dockge:
|
||||||
|
image: louislam/dockge:1
|
||||||
|
container_name: dockge
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "5001:5001"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- /opt/appdata/dockge/data:/app/data
|
||||||
|
- /opt/appdata:/opt/appdata # Mount our directory for Docker containers data
|
||||||
|
environment:
|
||||||
|
# Where to create our stacks
|
||||||
|
- DOCKGE_STACKS_DIR=/opt/appdata
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, we start Dockge (in detached mode):
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
From now on, this should be about the only time we'll directly use `docker compose` in the CLI.
|
||||||
Reference in New Issue
Block a user