fix: remove unused go binaries from redis and postgresql images

Both binaries gosu and su-exec are not used in our entrypoints.

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
Richard Steinmetz 2024-07-11 18:22:39 +02:00
parent f72ab28a41
commit 8027a7e5ec
No known key found for this signature in database
GPG key ID: 27137D9E7D273FB2
2 changed files with 8 additions and 2 deletions

View file

@ -32,7 +32,10 @@ RUN set -ex; \
\ \
# Give root a random password # Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \ echo "root:$(openssl rand -base64 12)" | chpasswd; \
apk --no-cache del openssl; apk --no-cache del openssl; \
\
# Get rid of unused binaries
rm /usr/local/bin/gosu /usr/local/bin/su-exec;
VOLUME /mnt/data VOLUME /mnt/data

View file

@ -9,7 +9,10 @@ RUN set -ex; \
apk add --no-cache openssl bash; \ apk add --no-cache openssl bash; \
\ \
# Give root a random password # Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd echo "root:$(openssl rand -base64 12)" | chpasswd; \
\
# Get rid of unused binaries
rm /usr/local/bin/gosu;
USER redis USER redis
ENTRYPOINT ["/start.sh"] ENTRYPOINT ["/start.sh"]