python alpine base image for image creation
This commit is contained in:
@@ -4,13 +4,13 @@ set -e
|
||||
# If running as root, fix ownership of /data, then drop privileges
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
mkdir -p /data
|
||||
chown -R appuser:appuser /data || echo "Warn: could not chown /data"
|
||||
chown -R appuser:appgroup /data || echo "Warn: could not chown /data"
|
||||
# Copy example config only if missing target
|
||||
if [ ! -f /app/config.yaml ] && [ -f /app/config.example.yaml ]; then
|
||||
cp /app/config.example.yaml /app/config.yaml
|
||||
chown appuser:appuser /app/config.yaml || true
|
||||
chown appuser:appgroup /app/config.yaml || true
|
||||
fi
|
||||
exec su -s /bin/sh appuser -c "$*"
|
||||
exec su-exec appuser "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user