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

Merged
merged 13 commits into from
Oct 3, 2024
36 changes: 36 additions & 0 deletions dockge/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3.7"

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
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
Contributor 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/dockge/stacks:${APP_DATA_DIR}/data/dockge/stacks
- ${APP_DATA_DIR}/data/docker:/var/run
environment:
DOCKGE_STACKS_DIR: ${APP_DATA_DIR}/data/dockge/stacks
FlyinPancake marked this conversation as resolved.
Show resolved Hide resolved
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 $@
64 changes: 64 additions & 0 deletions dockge/umbrel-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
manifestVersion: 1
id: dockge
category: developer
name: Dockge
version: "1.4.2"
tagline: Run custom Docker containers on your Umbrel
description: >-
⚠️ Make sure to only use named Docker volumes for your stacks and containers. Data in bind-mounted volumes
will be lost when the Portainer app is restarted or updated.
FlyinPancake marked this conversation as resolved.
Show resolved Hide resolved


⚠️ 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.

🛠️ 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 for your stacks and containers. Data in bind-mounted
volumes will be lost when the Portainer app is restarted or updated.
FlyinPancake marked this conversation as resolved.
Show resolved Hide resolved


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 the Portainer app is restarted or updated.
FlyinPancake marked this conversation as resolved.
Show resolved Hide resolved


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: 5001
gallery:
- 1.jpg
- 2.jpg
- 3.jpg
path: ""
defaultUsername: ""
defaultPassword: ""
releaseNotes: >-
FlyinPancake marked this conversation as resolved.
Show resolved Hide resolved
🐛 Bug Fixes

#380 Fixed the startup issue that Dockge is no longer working after restart
#342 Fixed the login placeholder issue (Thanks @cyril59310)

🦎 Translation Contributions

#340 #376 #381 Translations update from Kuma Weblate (Thanks @dng-nguyn @401U @Alanimdeo @MrEddX @NexiaMoe @Yirade @Zaid-maker @catfishlty @cyril59310 @gergepalfi @marco-doerig @nazo6 @oplexz @pacoculebras @queeup @stanol @tomeczekstecc)
#344 Added Hungarian (Thanks @gergepalfi)
#377 Added catalan (Thanks @pacoculebras)
#368 Added translate key (Thanks @cyril59310)

Please let me know if your username is missing, if your pull request has been merged in this version, or your commit has been included in one of the pull requests.

developer: Louis Lam (@louislam)
submitter: FlyinPancake
submission: https://github.com/getumbrel/umbrel-apps/pull/10000
FlyinPancake marked this conversation as resolved.
Show resolved Hide resolved