Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Submission: Dockge #1106

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Empty file added dockge/data/docker/.gitkeep
Empty file.
Empty file.
Empty file.
37 changes: 37 additions & 0 deletions dockge/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: "3.7"

Check notice on line 1 in dockge/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Potentially using unsafe user in service "docker"

The default container user "root" can lead to security vulnerabilities. If you are using the root user, please try to specify a different user (e.g. "1000:1000") in the compose file or try to set the UID/PUID and GID/PGID environment variables to 1000.

Check notice on line 1 in dockge/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Potentially using unsafe user in service "dockge"

The default container user "root" can lead to security vulnerabilities. If you are using the root user, please try to specify a different user (e.g. "1000:1000") in the compose file or try to set the UID/PUID and GID/PGID environment variables to 1000.

services:
app_proxy:
environment:
APP_HOST: dockge_dockge_1
APP_PORT: 5001

docker:
image: docker:24.0.5-dind@sha256:3c6e4dca7a63c9a32a4e00da40461ce067f255987ccc9721cf18ffa087bcd1ef
privileged: true
network_mode: host

Check notice on line 12 in dockge/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Service "docker" uses host network mode

The host network mode can lead to security vulnerabilities. If possible please use the default bridge network mode and expose the necessary ports.
stop_grace_period: 1m
restart: on-failure
environment:
DOCKER_ENSURE_BRIDGE: "dind0:10.32.0.1/16"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this IP?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from portainer. That being said, it might be interesting to see if Dockge would clash with Portainer noew

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two host bridges with the same IP reservations and different names, portainer and dockge, it probably will crash. You could use dind0:10.33.0.1/16, it is not being used by any other app.

Copy link
Contributor

@joaovictor-local joaovictor-local Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wrong about it, it will not crash but I still think it would be good to have a different ip reservation range for each app.

entrypoint: /entrypoint.sh
command: >
dockerd
--bridge dind0
--data-root /data/data
--exec-root /data/exec
--host unix:///data/docker.sock
--pidfile /data/docker.pid
volumes:
- ${APP_DATA_DIR}/entrypoint.sh:/entrypoint.sh
- ${APP_DATA_DIR}/data/docker:/data

dockge:
image: louislam/dockge:1.4.2@sha256:ec889251baff476366783bc4a092aaa08c601f377537a0f30fb922754edcd9b7
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/docker:/var/run
- ${APP_DATA_DIR}/data/dockge-data:/app/data
- ${APP_DATA_DIR}/data/dockge-stacks:/opt/stacks
environment:
DOCKGE_STACKS_DIR: /opt/stacks
47 changes: 47 additions & 0 deletions dockge/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/sh

# This hack can be removed if https://github.com/docker-library/docker/pull/444 gets merged.

# Remove docker pidfile if it exists to ensure Docker can start up after a bad shutdown
pidfile="/var/run/docker.pid"
if [[ -f "${pidfile}" ]]
then
rm -f "${pidfile}"
fi

# Use nftables as the backend for iptables
for command in iptables iptables-restore iptables-restore-translate iptables-save iptables-translate
do
ln -sf /sbin/xtables-nft-multi /sbin/$command
done

# Ensure that a bridge exists with the given name
ensure_bridge_exists() {
local name="${1}"
local ip_range="${2}"

# Check if the bridge already exists
if ip link show "${name}" &>/dev/null
then
echo "Bridge '${name}' already exists. Skipping creation."
ip addr show "${name}"
return
fi

echo "Bridge '${name}' does not exist. Creating..."
ip link add "${name}" type bridge
ip addr add "${ip_range}" dev "${name}"
ip link set "${name}" up

echo "Bridge '${name}' is now up with IP range '${ip_range}'."
ip addr show "${name}"
}

if [[ "${DOCKER_ENSURE_BRIDGE}" != "" ]]
then
bridge="${DOCKER_ENSURE_BRIDGE%%:*}"
ip_range="${DOCKER_ENSURE_BRIDGE#*:}"
ensure_bridge_exists "${bridge}" "${ip_range}"
fi

exec dockerd-entrypoint.sh $@
51 changes: 51 additions & 0 deletions dockge/umbrel-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
manifestVersion: 1
id: dockge
category: developer
name: Dockge
version: "1.4.2"
tagline: Easy to use Docker Compose manager
description: >-
⚠️ Make sure to only use named Docker volumes in your Compose files. Data in bind-mounted volumes
will be lost when Dockge is restarted or updated.


⚠️ Watch out for port conflicts between your custom Docker containers and your umbrelOS apps.


Dockge is a fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager to run custom Docker
containers on your Umbrel. It has an interactive editor for compose files and can convert docker run commands into docker-compose.yaml.


🛠️ Dockge on Umbrel is for power users, follow these best practices to avoid issues:


1. Data persistence: Make sure to only used named Docker volumes in your Compose files. Data in bind-mounted
volumes will be lost when Dockge is restarted or updated.


2. Port management: Watch out for potential port conflicts between your custom containers and umbrelOS' service containers,
apps you have installed from the Umbrel App Store or Community App Stores, and any apps you go to install in the future.


3. Container restart policy: Set your containers to "unless-stopped" or "always" restart policies. This will allow your containers
to restart automatically when Dockge is restarted or updated.


4. Web access to containers: Access your custom containers in your browser at umbrel.local:<mapped-port>. For example, for a container
with a web UI running on port 4545, navigate to umbrel.local:4545 to access it.
website: https://dockge.kuma.pet
dependencies: []
repo: https://github.com/louislam/dockge
support: https://github.com/louislam/dockge/issues
port: 5005
gallery:

Check warning on line 41 in dockge/umbrel-app.yml

View workflow job for this annotation

GitHub Actions / Lint apps

"icon" and "gallery" needs to be empty for new app submissions

The "icon" and "gallery" fields must be empty for new app submissions as it is being created by the Umbrel team.
- 1.jpg
- 2.jpg
- 3.jpg
path: ""
defaultUsername: ""
defaultPassword: ""
releaseNotes: ""
developer: Louis Lam
submitter: FlyinPancake
submission: https://github.com/getumbrel/umbrel-apps/pull/1106