GithubHelp home page GithubHelp logo

louislam / dockge Goto Github PK

View Code? Open in Web Editor NEW
9.2K 51.0 253.0 723 KB

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

Home Page: https://dockge.kuma.pet

License: MIT License

JavaScript 1.61% TypeScript 51.30% Dockerfile 0.74% HTML 0.31% Vue 41.64% SCSS 3.99% Go 0.41%
docker docker-compose docker-stack docker-stack-deploy responsive self-hosted selfhosted single-page-app socket-io webapp websocket docker-deployment docker-ui

dockge's Introduction

Dockge

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

GitHub Repo stars Docker Pulls Docker Image Version (latest semver) GitHub last commit (branch)

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

โญ Features

  • ๐Ÿง‘โ€๐Ÿ’ผ Manage your compose.yaml files
    • Create/Edit/Start/Stop/Restart/Delete
    • Update Docker Images
  • โŒจ๏ธ Interactive Editor for compose.yaml
  • ๐Ÿฆฆ Interactive Web Terminal
  • ๐Ÿ•ท๏ธ (1.4.0 ๐Ÿ†•) Multiple agents support - You can manage multiple stacks from different Docker hosts in one single interface
  • ๐Ÿช 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
  • ๐Ÿš„ 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

๐Ÿ”ง 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 x86_64)

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 originally hoped it sounds like Dodge, but apparently many people called it Dockage, it is also acceptable.

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 replacement?

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, single 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.

dockge's People

Contributors

401u avatar abnerssantana avatar abosaad11 avatar alanimdeo avatar altendorfme avatar bjornclauw avatar bunducdragos avatar cyril59310 avatar d3-3109 avatar demonisius avatar dng-nguyn avatar freddiedk avatar furkanipek avatar gergepalfi avatar gunnarnorin avatar levantinlynx avatar louislam avatar marco-doerig avatar mreddx avatar msalim7 avatar nazo6 avatar nexiamoe avatar ozy-viking avatar pacoculebras avatar rumplin avatar stanol avatar syko9000 avatar thalesc avatar watchakorn-18k avatar zaid-maker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockge's Issues

Bind Mount Volume Translated Incorrectly From Docker Run

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

From the home page, this docker run command was entered into the converstion tool:

docker run -d \
	--restart=always \
	--network better_bridge \
	--name YTDL \
	--mount type=bind,src=/mnt/Data/Seeding/_YTDL/,dst=/downloads \
	alexta69/metube

This was the output when trying to deploy the stack:

Dockge

It seems like src and dst are incorrect and I was able to fix it by chnaging to source and target respectively.

๐Ÿ‘Ÿ Reproduction steps

From the home page, enter this docker run command into the converstion tool:

docker run -d \
	--restart=always \
	--network better_bridge \
	--name YTDL \
	--mount type=bind,src=/mnt/Data/Seeding/_YTDL/,dst=/downloads \
	alexta69/metube

๐Ÿ‘€ Expected behavior

The next Deploy button should launch the container successfully.

๐Ÿ˜“ Actual Behavior

Dockge

Dockge Version

1.2.0

๐Ÿ’ป Operating System and Arch

Ubuntu 22.04 x64

๐ŸŒ Browser

Chrome 119.0.6045.160 (Official Build) (64-bit)

๐Ÿ‹ Docker Version

No response

๐ŸŸฉ NodeJS Version

Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1

๐Ÿ“ Relevant log output

No response

How to contribute?

Hello Louis I would like to translate dockge to German but I can't find any links.
Could you provide one?

Improve console layout width, avoid unnecessary new lines

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

When executing some commands (like docker ps) in the console the width is not correctly optimized and unnecessary new lines are inserted in the output.

Example:

immagine

Here we can see STATUS, PORTS and NAMES being on a new line

๐Ÿ‘Ÿ Reproduction steps

  1. Open the console in Dockge
  2. Launch a command which prints some long lines (like docker ps)
  3. Observe the output containing unnecessary new lines

๐Ÿ‘€ Expected behavior

I would like the output to be like it is in the console via SSH, like this:

immagine

๐Ÿ˜“ Actual Behavior

Unnecessary new lines are inserted even if there is enough space on the right in the console in Dockge

Dockge Version

1.3.3

๐Ÿ’ป Operating System and Arch

Debian 12 x64

๐ŸŒ Browser

Mozilla Firefox version 120.0.1

๐Ÿ‹ Docker Version

Docker version 24.0.7, build afdd53b

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

[Feature Request] Prompt before deleting images when deleting a stack

One of the images on my local is one I built myself quite some time ago, and no longer have the build files for. Thankfully I didn't end up losing the image, but I noticed when deleting one of my other stacks that dockge deletes the associated image files.

I know this is an edge case, as most people will be using standard images from a registry, and honestly it's my own fault that I no longer have the build files available, but I'd really appreciate if not deleting images was either a setting, or at the very least a prompt asking yes/no to deleting images associated with a stack when deleting a stack.

Commented out lines in compose file disappear when starting/deploying container.

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

I have created a new stack with Dockge and commented out some lines in the YAML with #

I then start/deploy the stack and it creates successfully and refreshed the page. The compose.yaml no longer shows me the commented out line, it disappears.

I then login to the host and nano compose.yaml and i can see the commented out line there but not in Dockge.

๐Ÿ‘Ÿ Reproduction steps

Create stack and comment out line
Deploy/start stack
Refresh Page

Line disappears

๐Ÿ‘€ Expected behavior

The commented out line still to appear in my compose.yaml so i can reintroduce it if i want to.

๐Ÿ˜“ Actual Behavior

Commented out line disappears from Dockge GUI

Dockge Version

1.1.1.1

๐Ÿ’ป Operating System and Arch

DietPI Debian

๐ŸŒ Browser

Firefox/Chrome

๐Ÿ‹ Docker Version

Docker 24.0.7

๐ŸŸฉ NodeJS Version

N/A

๐Ÿ“ Relevant log output

No response

Use existing stacks in the home directory

I tried setting up dockge with my existing docker-compose stacks, which are located in my home directory: ~/docker/โ€ฆ.

Here's how I mapped the volumens:

    volumes:
    โ€ฆ
      - /home/einmaulwurf/docker:/home/einmaulwurf/docker
    environment:
      - DOCKGE_STACKS_DIR=/home/einmaulwurf/docker

But there seems to be some problem with that. I can see all my containers in the dockge UI, but the compose files are shown as empty. Is it possible to use dockge in this setup, or do I have to move my compose files to /opt/stacks?

x-services parsing error

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

As shown in the figure below, the name set in x-services will become a1 when referenced in the service. At the same time, the parameters set by x-services are not displayed on the front end.

image
image

๐Ÿ‘Ÿ Reproduction steps

Using x-services..

๐Ÿ‘€ Expected behavior

x-services parsed correctly.

๐Ÿ˜“ Actual Behavior

x-services parsed error.

Dockge Version

1.2.0

๐Ÿ’ป Operating System and Arch

RockyLinux9.2

๐ŸŒ Browser

Google Chrome 119.0.6045.124

๐Ÿ‹ Docker Version

No response

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

External networks not showing anymore (1.3.0)

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

WinSCP_2023-12-04_18-50-55

This is minor but I my external networks are not displayed on the web gui anymore when I add or edit a stack.

๐Ÿ‘Ÿ Reproduction steps

Updated from 1.2.0 to 1.3.0 and reload the web gui.

๐Ÿ‘€ Expected behavior

On my example, I should see:

  • macvlan-dmz
  • macvlan-iot
  • macvlan-med
  • macvlan-svc

๐Ÿ˜“ Actual Behavior

There's no entry on the External Network section.

Dockge Version

1.3.0

๐Ÿ’ป Operating System and Arch

Debian 12

๐ŸŒ Browser

Firefox 120.0

๐Ÿ‹ Docker Version

Docker 24.0.7

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

Label shows "exited" if one container has exited but rest is running

Problem

If a stack has multiple containers, of which the one of the containers (purposely and knowingly) exits, the UI shows that the entire stack has exited.

image

Reproduction

Directory structure

collection/
โ”œโ”€โ”€ dockge/
โ”‚   โ””โ”€โ”€ compose.yaml
โ””โ”€โ”€ kuma/
    โ””โ”€โ”€ compose.yaml
./collection/dockge/compose.yaml
version: '3.9'

x-restart: &restart-always
  restart: always

services:
  dockge:
    image: louislam/dockge:${DOCKGE_IMAGE_VERSION}
    <<: [*restart-always]
    security_opt:
      - no-new-privileges:true
    environment:
      DOCKGE_STACKS_DIR: ${DOCKGE_STACKS_DIR_CONTAINER:-/opt/stacks}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - dockge:/app/data
      - ${DOCKGE_STACKS_DIR_HOST:-/opt/stacks}:${DOCKGE_STACKS_DIR_CONTAINER:-/opt/stacks}
    networks:
      - dockge
      - proxy

volumes:
  dockge:
    driver: local

networks:
  dockge:
    driver: bridge
  proxy:
    external: true
./collection/dockge/.env
DOCKGE_IMAGE_VERSION="1"
DOCKGE_STACKS_DIR_HOST="../" # resolves to "./collection" on host
DOCKGE_STACKS_DIR_CONTAINER=
./collection/kuma/compose.yaml
version: '3.9'

x-restart: &restart-always
  restart: always

services:
  uptime-kuma:
    image: louislam/uptime-kuma:${UPTIME_KUMA_IMAGE_VERSION}
    <<: [*restart-always]
    security_opt:
      - no-new-privileges:true
    volumes:
      - uptime_kuma:/app/data
    networks:
      - uptime-kuma
      - proxy

  wait:
    image: waisbrot/wait
    environment:
      TARGETS: uptime-kuma:3001
      TIMEOUT: 30
    networks:
      - uptime-kuma

volumes:
  uptime_kuma:
    driver: local

networks:
  uptime-kuma:
    driver: bridge
  proxy:
    external: true
./collection/kuma/.env
UPTIME_KUMA_IMAGE_VERSION="1"
$ docker compose logs -ft
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.607124969Z ==> Performing startup jobs and maintenance tasks
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.607674548Z ==> Starting application with user 0 group 0
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.644486738Z Welcome to Uptime Kuma
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.652094388Z Your Node.js version: 16.20.2
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.689036563Z 2023-11-12T16:12:34Z [SERVER] INFO: Welcome to Uptime Kuma
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.690065180Z 2023-11-12T16:12:34Z [SERVER] INFO: Node Env: production
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.690514441Z 2023-11-12T16:12:34Z [SERVER] INFO: Inside Container: true
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.690963362Z 2023-11-12T16:12:34Z [SERVER] INFO: Importing Node libraries
kuma-uptime-kuma-1  | 2023-11-12T16:12:34.691445555Z 2023-11-12T16:12:34Z [SERVER] INFO: Importing 3rd-party libraries
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.607024282Z 2023-11-12T16:12:35Z [SERVER] INFO: Creating express and socket.io instance
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.607921482Z 2023-11-12T16:12:35Z [SERVER] INFO: Server Type: HTTP
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.609980042Z 2023-11-12T16:12:35Z [SERVER] INFO: Importing this project modules
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.694761652Z 2023-11-12T16:12:35Z [NOTIFICATION] INFO: Prepare Notification Providers
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.700526247Z 2023-11-12T16:12:35Z [SERVER] INFO: Version: 1.23.3
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.746112357Z 2023-11-12T16:12:35Z [DB] INFO: Data Dir: ./data/
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.746473839Z 2023-11-12T16:12:35Z [SERVER] INFO: Connecting to the Database
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.798819111Z 2023-11-12T16:12:35Z [DB] INFO: SQLite config:
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.800552698Z [ { journal_mode: 'wal' } ]
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.801273238Z [ { cache_size: -12000 } ]
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.803553148Z 2023-11-12T16:12:35Z [DB] INFO: SQLite Version: 3.41.1
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.803847930Z 2023-11-12T16:12:35Z [SERVER] INFO: Connected
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.805342508Z 2023-11-12T16:12:35Z [DB] INFO: Your database version: 10
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.805642600Z 2023-11-12T16:12:35Z [DB] INFO: Latest database version: 10
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.805961989Z 2023-11-12T16:12:35Z [DB] INFO: Database patch not needed
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.806302656Z 2023-11-12T16:12:35Z [DB] INFO: Database Patch 2.0 Process
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.822781063Z 2023-11-12T16:12:35Z [SERVER] INFO: Load JWT secret from database.
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.823603669Z 2023-11-12T16:12:35Z [SERVER] INFO: No user, need setup
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.829144935Z 2023-11-12T16:12:35Z [SERVER] INFO: Adding route
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.851198407Z 2023-11-12T16:12:35Z [SERVER] INFO: Adding socket handler
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.851508783Z 2023-11-12T16:12:35Z [SERVER] INFO: Init the server
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.858831837Z 2023-11-12T16:12:35Z [SERVER] INFO: Listening on 3001
kuma-uptime-kuma-1  | 2023-11-12T16:12:35.860040715Z 2023-11-12T16:12:35Z [SERVICES] INFO: Starting nscd
kuma-wait-1         | 2023-11-12T16:12:36.307856735Z Waiting for uptime-kuma:3001  ..  up!
kuma-wait-1         | 2023-11-12T16:12:36.307896810Z Everything is up
kuma-wait-1 exited with code 0

Looking at stack.ts, I see it performs a statusConvert which checks if the status string starts with exited.

So I ran the following command in the stacks directory to see the status of the kuma stack.

$ docker compose ls --all --format json | jq '.[] | select(.Name == "kuma")'

{
  "Name": "kuma",
  "Status": "exited(1), running(1)",
  "ConfigFiles": "./collection/kuma/compose.yaml"
}

It has multiple statuses because one of the containers has exited, and the other one still running.

Possible solution

Maybe instead of startsWith try with includes(?)

The volume stacks is lost on the Windows

I deployed dockge on Windows at D:\myCompose\dockge and my docker-ompose.yaml file looks like this:

version: "3.8"
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
      - ./data:/app/data

      # If you want to use private registries, you need to share the auth file with Dockge:
      # - /root/.docker/:/root/.docker

      # Your stacks directory in the host (The paths inside container must be the same as the host)
      # โš ๏ธโš ๏ธ If you did it wrong, your data could end up be written into a wrong path.
      # โœ”๏ธโœ”๏ธโœ”๏ธโœ”๏ธ CORRECT EXAMPLE: - /my-stacks:/my-stacks (Both paths match)
      # โŒโŒโŒโŒ WRONG EXAMPLE: - /docker:/my-stacks (Both paths do not match)
      - ./stacks:/stacks
    environment:
      # Tell Dockge where is your stacks directory
      - DOCKGE_STACKS_DIR=/stacks

I tried deploying uptime-kuma, which has the following compose.yaml:

version: "3.8"
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    container_name: uptime-kuma
    volumes:
      - ./data:/app/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 13001:3001 # <Host Port>:<Container Port>
    restart: always

Now the problem is that I don't know how to specify the stack's directory, if I follow my previous binding ./stacks, then I can get D:\myCompose\dockge\stacks\uptime-kuma\compose.yaml, but I don't know where the ./data bound in compose.yaml is.

If you use the absolute path D:\myCompose\dockge\stacks, I get another error

Error response from daemon: invalid volume specification: '/run/desktop/mnt/host/d/myCompose/dockge/stacks:stacks:rw': invalid mount config for type "bind": invalid mount path: 'stacks' mount path must be absolute

CPU Usage is High

The CPU usage appears high. In my Dozzle, Dockge has the highest CPU usage (~10%) of any container Iโ€™m running. For comparison, Iโ€™ve also got Portainer running, and it shows zero CPU usage. Do you have any thoughts on why Dockge uses so much CPU?

Dockge eating 100% cpu

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

I noticed my CPU was pegged at 100% with node, so I did a docker stats and I see dockge is eating 100%+ cpu.

image

๐Ÿ‘Ÿ Reproduction steps

installed w/ basic docker compose

๐Ÿ‘€ Expected behavior

minor cpu usage

๐Ÿ˜“ Actual Behavior

all the cpu usage

Dockge Version

1.1.1

๐Ÿ’ป Operating System and Arch

Ubuntu 22.04

๐ŸŒ Browser

N/A

๐Ÿ‹ Docker Version

24.0.7

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

I checked logs, there really isn't anything happening, yet it is chewing all the cpu.
One thing that maybe the problem, but not sure, is I am running dockge stack inside the same stack folder, I know in the docs it has it outside of it.  Dockge seems to be confused by this and shows it as inactive.  I am not sure if this is related or not. 

I have a lot of containers running, some very complex and even when it isn't at 100% Cpu (when I restart it), it is using way more cpu than any other container by far.

Feedback & Suggestions

Another homerun, this is a great tool.

Some suggestions I have.

  • It gets a bit crowded, would be nice to be able to slide the left column when editing
  • dockge compose when stored with other stacks confuses dockge
  • Maybe even allow middle column to shrink when editing, or better yet have an "edit mode" that gives you more real estate
  • respect new lines, I like to have a new line between each service and global settings like networks:, when I view my compose in dockge, all my new lines are gone.
  • 2fa would be nice
  • not sure how you would do it, but would be nice to have versioning for the compose files some how, if it is done globally, or per stack folder with git, or something.
  • terminal only seems to use about 60% of it's space
  • would be nice to expand terminal so you have some more width to read as needed
  • file for a new icon for dashboard icons: https://github.com/walkxcode/dashboard-icons

Space is my big concern, it's just really crammed, even an ultra-wide.

stack marked as "exited" when conatiners are running

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

I'm trying to deploy this project using dockge
https://github.com/makeplane/plane
but it was marked as exited even if those containers are running.
image

๐Ÿ‘Ÿ Reproduction steps

  1. cd /opt/stacks
  2. git clone https://github.com/makeplane/plane.git
  3. hit the deploy button on dockge

๐Ÿ‘€ Expected behavior

Stack will be marked as ''active'' when containers starts running.

๐Ÿ˜“ Actual Behavior

Stack marked as ''exited'' when containers starts running.

Dockge Version

1.1.1

๐Ÿ’ป Operating System and Arch

Debian GNU/Linux 12 (bookworm) x86_64

๐ŸŒ Browser

Google Chrome 119.0.6045.160

๐Ÿ‹ Docker Version

Docker CE 24.0.7

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

Remove "version: x" from stack template

As per the docker recommendations, the "version: x" should no longer be included in compose files. As per #73 if I can have some suggestions as to how to build the image locally I'm happy to provide a PR

compose.yaml files not being saved on host machine

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

Deploying on Debian Bookworm x86 bare metal

When you compose a container and hit save, you do not see a compose file created on the local host in the identified folder. Also do not seem to see one in the Dockge container either.

When you do the scan function, it also doesn't pick up the folder/pre-made compose files.

Folders without compose config visible in UI

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

After #9 was fixed, Dockge will now startup even if mounted directory has folders without compose config files. However, Dockge will still show these folders in the UI.

image

๐Ÿ‘Ÿ Reproduction steps

  1. Add a folder without a compose.yaml file in the the mounted directory.
  2. Up dockge.
  3. See the unwanted folder in the sidebar.

๐Ÿ‘€ Expected behavior

Not showing folders(/files) that are irrelevant for Dockge; if it does not contain a compose configuration file, it should not show up.

๐Ÿ˜“ Actual Behavior

image

Dockge Version

1.1.1-nightly-20231125142720

๐Ÿ’ป Operating System and Arch

Ubuntu 22.04.2 LTS

๐ŸŒ Browser

Google Chrome 119.0.6045.160

๐Ÿ‹ Docker Version

24.0.5

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

Dockge stack missing

Hi there, i have tried to run a docker compose converted from docker run. it is successful, and all the compose file was resided in stack path. Eventually, after I refresh the stack (option in dockge web), the container turn to active (not manage, managed outside of dockge).

Thank you

Add an image, network and volume manager

Description: I came across the project and was amazed by the UI and functionality it has so far. I noticed in the description that this project is maninly focuses on using one compose.yml file for everything and that if you are looking to manage multiple single containers, they should use Portainer or the docker CLI, correct me if I am wrong. I think this project has potential to become something big and even an alternative to portainer.

With that being said, I was hoping if you could incoproate some features from Portainer. For example, an image, networks and volume manager would be incredible to have since I and maybe many people, only use these three tools to manage their whole docker stack without needing any other features from portainer, which makes using Portainer feel bloated since we or I do not need any other tools from their service, but at the end of the day, I am not sure.

This is mainly a feature request to add an image, network and volume manager. Sorry if I went overboard with the description, I spoke what I felt the potential this project had if enough development was done.

Dockge - Volumes not Found?

Hello,

I have the problem that my Gitlab Instance won't migrate to dockge.
I use Dockge via docker-compose....

Here is my docker-compose.yml for dockge:
image

Maybe I'm doin something wrong in the volumes configuration?

Gitlab Compose in Dockge

image

image

Dockge UI is not being showed (blank screen)

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

Without any environmental changes, the dockge UI is not being showed anymore.

image

๐Ÿ‘Ÿ Reproduction steps

  • Tried clearing cookies
  • Tried another browser
  • Tried another machine
  • Tried restarting container
  • Tried recreating dockge container
  • No issues were found on the dockge logs
  • DNS and Proxy working fine
  • All other containers are running fine.

๐Ÿ‘€ Expected behavior

Open the dockge UI

๐Ÿ˜“ Actual Behavior

Dockge UI is not being showed. Blank screen.

Dockge Version

1.1.1

๐Ÿ’ป Operating System and Arch

Debian 12

๐ŸŒ Browser

Google Chrome Version 119.0.6045.160 (Official Build) (64-bit)

๐Ÿ‹ Docker Version

Docker version 24.0.7

๐ŸŸฉ NodeJS Version

N/A

๐Ÿ“ Relevant log output

2023-11-24T11:01:48Z [SERVER] INFO: Welcome to dockge!
2023-11-24T11:01:48Z [SERVER] INFO: NODE_ENV: production
2023-11-24T11:01:48Z [SERVER] INFO: Data Dir: ./data/
2023-11-24T11:01:48Z [SERVER] INFO: Server Type: HTTP
2023-11-24T11:01:48Z [DB] INFO: Database Type: sqlite
2023-11-24T11:01:48Z [SERVER] INFO: Connected to the database
2023-11-24T11:01:48Z [SERVER] INFO: Listening on 5001

New stacks being created with root owner

Hi, I have noticed that when creating a new stack, the owner of the stack/compose file is set to the container user, could we supply a user/group to assign it to maybe in the environment variables? It seems PUID=1000 PGID=1000 seem to have become the standard env variables to use for this

Error message when updating stacks with Dockge

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

image
Even if the update has worked or there is no update, this error message appears.

๐Ÿ‘Ÿ Reproduction steps

Press "update" button on any of your stacks.

๐Ÿ‘€ Expected behavior

A success message when an update has taken place and a message when there is nothing to update.

๐Ÿ˜“ Actual Behavior

Error message

Dockge Version

1.3.1

๐Ÿ’ป Operating System and Arch

Ubuntu 23.10

๐ŸŒ Browser

Google Chrome 119.0.6045.200

๐Ÿ‹ Docker Version

24.0.7

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

"Storage" default stack

When installing, a stack called storage appears, which is always invative, in the stacks folder there is no file or folder.

image

2023-11-14T02:27:37Z [SERVER] INFO: Welcome to dockge!
2023-11-14T02:27:37Z [SERVER] INFO: NODE_ENV: production
2023-11-14T02:27:37Z [SERVER] INFO: Data Dir: ./data/
2023-11-14T02:27:37Z [SERVER] INFO: Server Type: HTTP
2023-11-14T02:27:37Z [DB] WARN: ENOENT: no such file or directory, open 'data/db-config.json'
2023-11-14T02:27:37Z [DB] INFO: Database Type: sqlite
2023-11-14T02:27:37Z [SERVER] INFO: Connected to the database
2023-11-14T02:27:37Z [SERVER] INFO: JWT secret is not found, generate one.
2023-11-14T02:27:37Z [SERVER] INFO: Stored JWT secret into database
2023-11-14T02:27:37Z [SERVER] INFO: No user, need setup
2023-11-14T02:27:37Z [SERVER] INFO: Listening on 5001
2023-11-14T02:27:38Z [SERVER] INFO: Socket connected!
2023-11-14T02:27:38Z [SERVER] INFO: Redirect to setup page
2023-11-14T02:27:38Z [AUTH] INFO: Login by token. IP=0.0.0.0
2023-11-14T02:27:38Z [AUTH] ERROR: Invalid token. IP=0.0.0.0
2023-11-14T02:27:38Z [AUTH] ERROR: invalid signature
2023-11-14T02:27:39Z [SERVER] INFO: Socket connected!
2023-11-14T02:27:39Z [SERVER] INFO: Redirect to setup page
2023-11-14T02:27:47Z [AUTH] INFO: Login by username + password. IP=0.0.0.0
2023-11-14T02:27:47Z [RATE-LIMIT] INFO: remaining requests: 19
2023-11-14T02:27:47Z [AUTH] INFO: Successfully logged in user xxx. IP=0.0.0.0

Dockge output sometimes immediately hangs

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

Dockge output sometimes immediately hangs, without any apparent errors. It will happen randomly, though it is possible to temporarily resolve the issue by restarting Dockge container. I can't see anything that would indicate a problem in the logs of either the browser or the container.

๐Ÿ‘Ÿ Reproduction steps

Try to stop a running container, edit and deploy one, restart, or just start a stopped one

๐Ÿ‘€ Expected behavior

The window produces a proper output, like:
image
or maybe
image

๐Ÿ˜“ Actual Behavior

Sometimes the output hangs immediately after a first log, producing something like:
image
Sometimes it doesn't produce anything, leaving behind an empty window
image
It will also always produce a success message, doesn't matter if it manages to start/stop the container
image
It will also fail to update the container status, leaving active even though it has just stopped, or leaving exited, inactive while it's running.

It is also worth noting that logs will often show the real state of the container (like showing it shutting down, or not reacting at all)

Dockge Version

1.1.1

๐Ÿ’ป Operating System and Arch

Ubuntu 22.04 amd64

๐ŸŒ Browser

Firefox Nightly 120.0b9

๐Ÿ‹ Docker Version

24.0.7, build afdd53b

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

Bring compatibility to OrbStack

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

Dockge is unable to connect to the Docker daemon on Orbstack. Despite mounting the Docker socket /var/run/docker.sock from the host into the container, Dockge tries to directly access the Docker socket on the host OS at path /Users/(redacted)/.orbstack/run/docker.sock, which is not accessible from within the Docker container.

๐Ÿ‘Ÿ Reproduction steps

  1. Use Orbstack instead of Docker Desktop on macOS.
  2. Set up Dockge's compose file with this volume:
volumes:
  - /var/run/docker.sock:/var/run/docker.sock
  - ...
  1. Start Dockge.

๐Ÿ‘€ Expected behavior

Dockge should be able to successfully communicate with the Docker daemon using the Docker socket mounted into the container at /var/run/docker.sock.

๐Ÿ˜“ Actual Behavior

However, Dockge appears to be trying to communicate with Docker daemon via the host's filesystem directly at /Users/(redacted)/.orbstack/run/docker.sock. This operation ends up in failure as a Docker container cannot directly access the file system of its host, resulting in the error:

Cannot connect to the Docker daemon at unix:///Users/(redacted)/.orbstack/run/docker.sock. Is the docker daemon running?

Dockge Version

1.2

๐Ÿ’ป Operating System and Arch

macOS Sonoma 14.1.1 (23B81)

๐ŸŒ Browser

Arc 1.17.2 (43249) Chromium Engine 119.0.6045.159

๐Ÿ‹ Docker Version

24.0.6

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

dockge  | 2023-11-28T15:21:03Z [SERVER] INFO: Welcome to dockge!
dockge  | 2023-11-28T15:21:03Z [SERVER] INFO: NODE_ENV: production
dockge  | 2023-11-28T15:21:03Z [SERVER] INFO: Data Dir: ./data/
dockge  | 2023-11-28T15:21:03Z [SERVER] INFO: Server Type: HTTP
dockge  | 2023-11-28T15:21:03Z [DB] INFO: Database Type: sqlite
dockge  | 2023-11-28T15:21:03Z [SERVER] INFO: Connected to the database
dockge  | 2023-11-28T15:21:03Z [SERVER] INFO: Listening on 5001
dockge  | 2023-11-28T15:21:03Z [SERVER] INFO: Socket connected!
dockge  | 2023-11-28T15:21:03Z [AUTH] INFO: Login by token. IP=192.168.228.1
dockge  | 2023-11-28T15:21:03Z [AUTH] INFO: Username from JWT: jonathan
dockge  | Cannot connect to the Docker daemon at unix:///Users/(redacted)/.orbstack/run/docker.sock. Is the docker daemon running?
dockge  | 2023-11-28T15:21:03Z [SERVER] ERROR: Error: Command failed: docker compose ls --all --format json
dockge  | Cannot connect to the Docker daemon at unix:///Users/(redacted)/.orbstack/run/docker.sock. Is the docker daemon running?
dockge  | 
dockge  |     at __node_internal_genericNodeError (node:internal/errors:865:15)
dockge  |     at checkExecSyncError (node:child_process:885:11)
dockge  |     at Object.execSync (node:child_process:957:15)
dockge  |     at Function.getStackList (/app/backend/stack.ts:225:32)
dockge  |     at DockgeServer.sendStackList (/app/backend/dockge-server.ts:497:43)
dockge  |     at DockgeServer.afterLogin (/app/backend/dockge-server.ts:248:18)
dockge  |     at Socket.<anonymous> (/app/backend/socket-handlers/main-socket-handler.ts:76:34) {
dockge  |   status: 1,
dockge  |   signal: null,
dockge  |   output: [
dockge  |     null,
dockge  |     <Buffer >,
dockge  |     <Buffer 43 61 6e 6e 6f 74 20 63 6f 6e 6e 65 63 74 20 74 6f 20 74 68 65 20 44 6f 63 6b 65 72 20 64 61 65 6d 6f 6e 20 61 74 20 75 6e 69 78 3a 2f 2f 2f 55 73 65 ... 69 more bytes>
dockge  |   ],
dockge  |   pid: 48,
dockge  |   stdout: <Buffer >,
dockge  |   stderr: <Buffer 43 61 6e 6e 6f 74 20 63 6f 6e 6e 65 63 74 20 74 6f 20 74 68 65 20 44 6f 63 6b 65 72 20 64 61 65 6d 6f 6e 20 61 74 20 75 6e 69 78 3a 2f 2f 2f 55 73 65 ... 69 more bytes>
dockge  | }

Disable Animations

You can add an option to disable the animation in the settings. I mean this animation of moving up the block after switching from docker 1 to docker 2.

Support docker-compose.yml files

I already have my stacks use docker-compose.yml, and it appears that this project only supports files named compose.yaml. It should automatically detect which file name is used for the project (and possibly configure which name it should create for new stacks, with like an env var) and use that. So with/without docker- prefix and .yaml and .yml.

"inactive" dockge in dockge

Is it intended or bug?

everything is lowercase, so it can't be #19

image

and terminal works :)

image

update: folder structure like below, only dockge itself shows inactive

docker
โ”œโ”€โ”€ some-service
โ”‚   โ”œโ”€โ”€ config
โ”‚   โ””โ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ some-other-service
โ”‚   โ”œโ”€โ”€ cache
โ”‚   โ”œโ”€โ”€ data
โ”‚   โ””โ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ dockge
โ”‚   โ”œโ”€โ”€ data
โ”‚   โ””โ”€โ”€ docker-compose.yml

Octoprint container creating a new entry when running, showing as "not managed by Dockge"

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

I moved my two octoprint stacks into the stacks folder and run them via the web interface, however upon start they create a new entry in the sidebar which is faded out and shows "This stack is not managed by Dockge." The original entry stays on "inactive"

๐Ÿ‘Ÿ Reproduction steps

  1. Move existing octoprint stack to the stacks folder (maybe also works with new stack)
  2. Run via web interface

๐Ÿ‘€ Expected behavior

Only one entry on sidebar which shows the stack as "running" and lets me stop, update and restart.

๐Ÿ˜“ Actual Behavior

"Inactive" entry stays, another entry shows up which states the container is not managed by Dockge.

Dockge Version

1.1.1

๐Ÿ’ป Operating System and Arch

Proxmox VE 8.1.3 x86_64

๐ŸŒ Browser

Safari (MacOS)

๐Ÿ‹ Docker Version

No response

๐ŸŸฉ NodeJS Version

20.10.24+dfsg1

๐Ÿ“ Relevant log output

"This stack is not managed by Dockge."

Re-deploy of Dockge resets control of containers

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

When deploying Dockge, if you need to docker compose down/up again, or if you update the container any containers created with Dockge lose the ability to be managed by Dockge.

Deployed on bare metal Debian Bookworm x86

Are .env files supported?

Im using .env file for all my stacks, and all of them report missing vars:

WARN[0000] The "DOCKER_STORAGE_PATH" variable is not set. Defaulting to a blank string.
WARN[0000] The "DOCKER_NETWORK" variable is not set. Defaulting to a blank string.
WARN[0000] The "SERVER_DOMAIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SERVER_DOMAIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "DOCKER_NETWORK" variable is not set. Defaulting to a blank string.

[Bug] Created stack in dockge, but dockge says the stack isn't managed by dockge

So I've just created a stack in dockge, got everything setup similar to how I used to run it (decided to recreate all of my config rather than import it) but now when I deploy it says it's not managed by dockge, despite the fact that I wrote and deployed it using dockge exclusively:

image

If I go to the inactive one it shows the running containers but I can't stop them:

image

Creating a new Stack makes directory owned as ROOT

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

When creating a stack with Dockge the directory on the host is owned by root

Ideally passing in the user param into a docker compose should be the fix for this

user: 1001:1001

๐Ÿ‘Ÿ Reproduction steps

Create a stack using dockage

๐Ÿ‘€ Expected behavior

Folder should be owned by host

๐Ÿ˜“ Actual Behavior

Folder owned by root

Dockge Version

1.1.1

๐Ÿ’ป Operating System and Arch

Arch x64

๐ŸŒ Browser

Any

๐Ÿ‹ Docker Version

No response

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

It's not possible to delete a stack

I've tried this twice now, but every time I try to delete a stack it gives the following message:

image

Simply stopping the containers and deleting the compose.yml file results in a dangling stack that cannot be removed, as it is 'not managed by Dockge'.

Y/n inputs not allowed in console

โš ๏ธ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

๐Ÿ›ก๏ธ Security Policy

Description

For example if I use the command docker prune --all it will prompt me the question are you sure: y/N". I'm not allowed to send the command. Not sure it is a bug or by design as it is not listed in the top.

๐Ÿ‘Ÿ Reproduction steps

docker prune --all from the command line

๐Ÿ‘€ Expected behavior

input y/n or yes/no

๐Ÿ˜“ Actual Behavior

Command not allowed

Dockge Version

1.20

๐Ÿ’ป Operating System and Arch

Ubuntu

๐ŸŒ Browser

Chrome

๐Ÿ‹ Docker Version

No response

๐ŸŸฉ NodeJS Version

No response

๐Ÿ“ Relevant log output

No response

Imported stacks not showing full compse file.

using louislam/dockge:latest

I installed Dockge and moved a couple containers into the stacks folder. I can start, stop, and update the containers, as well as view the real time log, however the compose file doesn't show up properly.

For example:
This is my compose file for Grocy;

---
version: "3.8"
services:
  grocy:
    image: lscr.io/linuxserver/grocy:latest
    container_name: grocy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
    volumes:
      - ./data:/config
    ports:
      - 9283:80
    restart: unless-stopped
    memswap_limit: "512M"
    deploy:
      resources:
        limits:
          cpus: "1"
          memory: "512M"

However in Dockge it's only showing;

1. services: {}
2. version: "3.8"
3. networks: {}
4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.