Release v0.8.0 — Portainer-first install, in-app guide
- Install from Portainer with no command line: paste the compose, set a folder and a password, deploy. Inspector creates its own config and detects Docker socket permissions by itself. - Illustrated how-to guide inside the app (Help tab) and in the repo. - Containers added in the UI are watched right away, no restart. - maintenance_window switch on the container form. - README with logo and screenshots; INSTALL rewritten for Portainer.
This commit is contained in:
1 parent
4c05a4d565
commit
c603e86e75
21 files changed
+789
-202
No files matched your search
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Inspector container entrypoint.
|
||||
#
|
||||
# Started as root (the default): find the group that owns the Docker socket,
|
||||
# make the mounted folders writable, then drop to an unprivileged user with
|
||||
# that group added. No DOCKER_GID / group_add needed.
|
||||
#
|
||||
# Started as non-root (compose `user:` / older group_add setups): run as-is.
|
||||
set -e
|
||||
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
PUID="${PUID:-1000}"
|
||||
PGID="${PGID:-1000}"
|
||||
SOCK=/var/run/docker.sock
|
||||
|
||||
groups="$PGID"
|
||||
if [ -S "$SOCK" ]; then
|
||||
sock_gid="$(stat -c %g "$SOCK")"
|
||||
groups="$groups,$sock_gid"
|
||||
else
|
||||
echo "warning: $SOCK is not mounted; Inspector cannot see any containers" >&2
|
||||
fi
|
||||
|
||||
# Mounted folders are often created by Docker as root. Hand them (not their
|
||||
# contents) to the runtime user so Inspector can write config, logs and data.
|
||||
for d in /app/config /app/logs /app/data; do
|
||||
if [ -d "$d" ] && [ "$(stat -c %u "$d")" != "$PUID" ]; then
|
||||
chown "$PUID:$PGID" "$d" 2>/dev/null || echo "warning: could not chown $d" >&2
|
||||
fi
|
||||
done
|
||||
if [ -f /app/config/config.yml ] && [ "$(stat -c %u /app/config/config.yml)" != "$PUID" ]; then
|
||||
chown "$PUID:$PGID" /app/config/config.yml 2>/dev/null || true
|
||||
fi
|
||||
|
||||
exec setpriv --reuid="$PUID" --regid="$PGID" --groups="$groups" "$@"
|
||||
Reference in new issue
Block a user