#!/bin/sh set -e # A container's loopback is not reachable from outside it, so the default bind of # 127.0.0.1 would leave the UI unreachable. Write a starter config that binds 0.0.0.0 # on first run; after that the file is yours and is never rewritten. if [ ! -f "$IPX_CONFIG" ]; then mkdir -p "$(dirname "$IPX_CONFIG")" cat > "$IPX_CONFIG" </dev/null 2>&1; then addgroup --gid "$PGID" ipx 2>/dev/null || true; fi if ! getent passwd ipx >/dev/null 2>&1; then adduser --uid "$PUID" --gid "$PGID" --disabled-password --gecos "" ipx 2>/dev/null || true fi chown -R "$PUID:$PGID" "$IPX_DATA_DIR" "$(dirname "$IPX_CONFIG")" 2>/dev/null || true exec gosu "$PUID:$PGID" "$@" fi exec "$@"