do not give root a random password if login is already disabled by default

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2026-08-25 13:00:24 +02:00
committed by Simon L.
parent a95737744c
commit fee4903fef
6 changed files with 4 additions and 31 deletions
-5
View File
@@ -13,7 +13,6 @@ RUN set -ex; \
apk upgrade --no-cache -a; \
apk add --no-cache \
bash \
openssl \
shadow \
netcat-openbsd \
grep; \
@@ -35,10 +34,6 @@ RUN set -ex; \
mkdir /mnt/data; \
chown postgres:postgres /mnt/data; \
\
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
apk --no-cache del openssl; \
\
# Get rid of unused binaries
rm -f /usr/local/bin/gosu /usr/local/bin/su-exec;