Fix missing addgroup/adduser commands in Debian slim image

Replace addgroup/adduser with groupadd/useradd which are available
in the debian:stable-slim base image. The addgroup and adduser commands
are part of the adduser package which is not installed in the slim image.

This fixes the build failure:
/bin/bash: line 1: addgroup: command not found

Continues fix for #582
This commit is contained in:
Florian Kinder
2025-08-13 22:34:46 +09:00
parent 19ca8d8ceb
commit 35221ac441

View File

@@ -54,8 +54,8 @@ RUN apt-get -q update \
fi \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup --system --gid "$PGID" "$GROUP" \
&& adduser --system --uid "$PUID" --gid "$PGID" --no-create-home --disabled-password --shell /bin/sh "$USER"
RUN groupadd --system --gid "$PGID" "$GROUP" \
&& useradd --system --uid "$PUID" --gid "$PGID" --no-create-home --shell /bin/sh "$USER"
# version checksum of the archive to download
ARG VERSION