diff --git a/entrypoint.sh b/entrypoint.sh index 520ad7b..acc2259 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -e -if ! [[ "$PUID" =~ ^[0-9]+$ ]] || ! [[ "$PGID" =~ ^[0-9]+$ ]]; then - echo "[entrypoint] ERROR: PUID and PGID must be numeric integers." >&2 +if [[ -n "$PUID" && ! "$PUID" =~ ^[0-9]+$ ]] || [[ -n "$PGID" && ! "$PGID" =~ ^[0-9]+$ ]] || [[ -z "$PUID" && -n "$PGID" ]]; then + echo "[entrypoint] ERROR: PUID and PGID must be numeric integers or unset." >&2 exit 1 fi