Dockge

Dockge simplifies Docker management, particularly when dealing with Docker stacks. You can perform tasks like creating, editing, starting, stopping, restarting, and deleting Docker containers and services through a web terminal.

Dockge

My new favourite Docker tool! Dockge makes working with Docker an easy task. I have had it in my TemplateBuilder for some time.
The ease of deploying and setting the environment file in on is a grate improvement from Portainer. That said Portainer is my choice for large production installs but for my own homelab I prefer Dockge all day long. I have been using it from a early version but today it's stable and have the agent as a functional test version (haven't tested that much but so far no catastrophic fails).

  • Dockge is by luislam the author of Uptime Kuma.
  • Another use case is to convert Docker run commands into compose.yml files.

Install

There is many ways to install Dockge.

Create your directories

Make your directories and create the compose.yml. I vant to have all Docker stuff in my VM's superuser home folder under a directories docker.

mkdir -p docker/stacks docker/dockge && cd docker/dockge

A old habit is to put all these things in the opt directory

mkdir -p /opt/stacks /opt/dockge
chown root:root /opt/dockge
cd /opt/dockge

TemplateBuilder

It's all automated alongside creating the VM, adding Docker and other stuff.

A one-liner

Create the directories and run this, replace <user> with use your user name

/var/run/docker.sock:/var/run/docker.sock -v /home/<user>/docker/dockge/data:/app/data -v /home/<user>/docker/stacks:/home/<user>/docker/stacks -e DOCKGE_STACKS_DIR=/home/<root>/docker/stacks louislam/dockge:latest

By compose.yml

Create the directories and create the compose.yml. I want to have all Docker stuff in my VM's /home/superuser/ folder under a directory named docker.

version: "3.8"
services:
  dockge:
    image: louislam/dockge:1
    container_name: dockge 
    restart: unless-stopped
    ports:
      # Host Port : Container Port
      - 3010:5001
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./data:/app/data
      - .docker/stacks:/opt/stacks
    environment:
      - DOCKGE_STACKS_DIR=/docker/stacks

Or by composing it on the web to use the stock version

curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output compose.yaml

Start Dockge

After installing you are ready to use Dockge. It's really easy to setup the environment by editing the .env file in Dockage.

⚠️ It's safer to have passwords and especially tokens in the .env file.

docker compose up -d

Start Dockge