Portainer Templates logo

Portainer Templates

Dockge Dockge

Stack

Management

A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager.

Image details

Pulls: 26.5M
Architecture: amd64, arm64, arm/v7
Image size: 251 MB
Latest: 1.5.0
User: louislam
Created: Nov 04, 2023
Updated: 3 hours ago
Status: active

Source details

Stars: 24.1k
Forks: 804
Language: TypeScript
License: MIT
Updated: 3 months ago

Configuration

Type
Compose
Platform
linux
Image
louislam/dockge:1
Ports
5001:5001
Volumes
/var/run/docker.sock : /var/run/docker.sock/app/data : /portainer/Files/AppData/Config/dockge/data/opt/stacks : /portainer/Files/AppData/Config/dockge/stacks
Env vars
DOCKGE_STACKS_DIR=/portainer/Files/AppData/Config/dockge/stacks
Restart
unless-stopped
Source

Template by xneo1·Source

Standalone Install

Select an install method, to see config/commands for deploying Dockge

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Dockge, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo
Original stackfile

The compose file this template deploys, straight from its repo:

services:
  dockge:
    image: louislam/dockge:1
    restart: unless-stopped
    ports:
      # Host Port : Container Port
      - 5001:5001
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /portainer/Files/AppData/Config/dockge/data:/app/data
      - /portainer/Files/AppData/Config/dockge/stacks:/opt/stacks  
      # If you want to use private registries, you need to share the auth file with Dockge:
      # - /root/.docker/:/root/.docker
     
    environment:
      # Tell Dockge where is your stacks directory
      - DOCKGE_STACKS_DIR=/portainer/Files/AppData/Config/dockge/stacks

Or deploy it directly from the source:

git clone https://github.com/xneo1/portainer_templates
cd portainer_templates
docker compose -f Template/Stack/dockge.yml up -d

More install options in our documentation, or see louislam/dockge for app-specific guidance.

<img src="./frontend/public/icon.svg" width="128" alt="" />

Dockge

A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager.
GitHub Repo stars GitHub issues GitHub pull requests Docker Pulls Docker Image Version (latest semver) GitHub last commit (branch) GitHub

View Video: https://youtu.be/AWAlOQeNpgU?t=48

⭐ Features

  • Manage compose.yaml
- Create/Edit/Start/Stop/Restart/Delete - Update Docker Images
  • Interactive Editor for compose.yaml
  • Interactive Web Terminal
  • Reactive
- Everything is just responsive. Progress (Pull/Up/Down) and terminal output are in real-time
  • Easy-to-use & fancy UI
- If you love Uptime Kuma's UI/UX, you will love this one too
  • Convert docker run ... commands into compose.yaml
  • File based structure
- Dockge won't kidnap your compose files, they are stored on your drive as usual. You can interact with them using normal `docker compose` commands
<img src="https://github.com/louislam/dockge/assets/1336778/cc071864-592e-4909-b73a-343a57494002" width=300 />

🔧 How to Install

Requirements:
  • Docker 20+ / Podman
  • (Podman only) podman-docker (Debian: apt install podman-docker)
  • OS:
- Major Linux distros that can run Docker/Podman such as:
- ✅ Ubuntu
- ✅ Debian (Bullseye or newer)
- ✅ Raspbian (Bullseye or newer)
- ✅ CentOS
- ✅ Fedora
- ✅ ArchLinux
- ❌ Debian/Raspbian Buster or lower is not supported - ❌ Windows (Will be supported later)
  • Arch: armv7, arm64, amd64 (a.k.a x8664)

Basic

  • Default Stacks Directory: /opt/stacks
  • Default Port: 5001

# Create directories that store your stacks and stores Dockge's stack
mkdir -p /opt/stacks /opt/dockge
cd /opt/dockge

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

# Start the server
docker compose up -d

# If you are using docker-compose V1 or Podman
# docker-compose up -d

Dockge is now running on http://localhost:5001

Advanced

If you want to store your stacks in another directory, you can generate your compose.yaml file by using the following URL with custom query strings.
# Download your compose.yaml
curl "https://dockge.kuma.pet/compose.yaml?port=5001&stacksPath=/opt/stacks" --output compose.yaml

  • port=5001
  • stacksPath=/opt/stacks

Interactive compose.yaml generator is available on: https://dockge.kuma.pet

How to Update

cd /opt/dockge
docker compose pull && docker compose up -d

Screenshots




Motivations

  • I have been using Portainer for some time, but for the stack management, I am sometimes not satisfied with it. For example, sometimes when I try to deploy a stack, the loading icon keeps spinning for a few minutes without progress. And sometimes error messages are not clear.
  • Try to develop with ES Module + TypeScript (Originally, I planned to use Deno or Bun.js, but they don't have support for arm64, so I stepped back to Node.js)

If you love this project, please consider giving it a ⭐.

🗣️ Community and Contribution

Bug Report

https://github.com/louislam/dockge/issues

Ask for Help / Discussions

https://github.com/louislam/dockge/discussions

Translation

If you want to translate Dockge into your language, please read Translation Guide

Create a Pull Request

Be sure to read the guide, as we don't accept all types of pull requests and don't want to waste your time.

FAQ

"Dockge"?

"Dockge" is a coinage word which is created by myself. I hope it sounds like Dodge.
The naming idea came from Twitch emotes like sadge, bedge or wokege. They all end in -ge.

Can I manage a single container without compose.yaml?

The main objective of Dockge is to try to use the docker compose.yaml for everything. If you want to manage a single container, you can just use Portainer or Docker CLI.

Can I manage existing stacks?

Yes, you can. However, you need to move your compose file into the stacks directory:
  1. Stop your stack
  2. Move your compose file into /opt/stacks/<stackName>/compose.yaml
  3. In Dockge, click the " Scan Stacks Folder" button in the top-right corner's dropdown menu
  4. Now you should see your stack in the list

Is Dockge a Portainer replcement?

Yes or no. Portainer provides a lot of Docker features. While Dockge is currently only focusing on docker-compose with a better user interface and better user experience.
If you want to manage your container with docker-compose only, the answer may be yes.
If you still need to manage something like docker networks, signle containers, the answer may be no.

Can I install both Dockge and Portainer?

Yes, you can.

Others

Dockge is built on top of Compose V2. compose.yaml also known as docker-compose.yml.

Serve Dockge on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying dockge.example.com to http://dockge:5001

Add this to your Caddyfile

dockge.example.com {
	reverse_proxy http://dockge:5001
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs <container>
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Port already in use

If deployment fails with "Bind for 0.0.0.0:5001 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :5001
  • Stop the other service, or pick a different host port. In 5001:5001 only the left number is yours to change, the right one belongs to the app.

Running but the page won't load

The container is up but nothing appears in your browser.

  • Use your server's real IP: http://your-server-ip:5001. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, dockge can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 5001

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /portainer/Files/AppData/Config/dockge/data (and the same for the other mapped folders)

Can't reach the Docker socket

dockge talks to Docker through /var/run/docker.sock. If the logs show "permission denied while trying to connect to the Docker daemon socket", the app's user can't access it.

  • Check the socket exists on the host: ls -l /var/run/docker.sock
  • Run the container as root, or add the docker group's id to the container with group_add.

Image won't pull

Test the pull directly on the host: docker pull louislam/dockge:1

  • "manifest unknown" means the tag no longer exists.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64, arm/v7
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect <container> --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Stack won't deploy

Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.

  • YAML only accepts spaces for indentation, a single tab breaks the whole file.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A Compose stack

Dockge is a Compose stack, a set of containers defined in one file and brought up together by Portainer, then started and stopped as a single app.

The app image

An image is the app packed up ready to go, everything Dockge needs bundled into one download. This template pulls louislam/dockge:1, which Docker fetches once (about 251 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. Dockge's comes from Docker Hub, published by louislam.

Version tags

The bit after the colon in the image name is the version tag. This one pins 1, so every redeploy gives you that exact build until you bump it yourself.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm64, arm/v7, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. A mapping like 5001:5001 means it's reachable on port 5001 of your server, where the left number is yours to change and the right one belongs to the app. It opens:

  • 5001:5001

Volumes

A volume is where Dockge keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /var/run/docker.sock from /var/run/docker.sock on the host (a socket it talks to, not storage)
  • /app/data from /portainer/Files/AppData/Config/dockge/data on the host
  • /opt/stacks from /portainer/Files/AppData/Config/dockge/stacks on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Dockge takes 1 of them, all with defaults you can leave alone or tweak:

  • DOCKGE_STACKS_DIR, defaults to /portainer/Files/AppData/Config/dockge/stacks

Restart policy

The restart policy here is unless-stopped, so Docker restarts Dockge after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Networking

Nothing custom is set, so Dockge sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container dockge. That's what you'll spot in the containers list and use in commands like docker logs dockge.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Open source license

Dockge is open source, released under the MIT license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Dockge up. Add the template list to Portainer once, then deploying Dockge is a click rather than a wall of config.