From ef430208ac2002b4efcf540d8cfc48c039551882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20H=C3=A1na?= Date: Mon, 21 Aug 2023 17:20:15 +0200 Subject: [PATCH] Run as nonroot --- adminer-postgres/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/adminer-postgres/Dockerfile b/adminer-postgres/Dockerfile index c5352ae..f5ba2a1 100644 --- a/adminer-postgres/Dockerfile +++ b/adminer-postgres/Dockerfile @@ -26,6 +26,11 @@ RUN echo '@community http://nl.alpinelinux.org/alpine/v3.14/community' >> /etc/a WORKDIR /srv EXPOSE 80 +# Create a non-root user +RUN addgroup -g 1001 -S nonroot +RUN adduser -S nonroot -u 1001 +USER nonroot + ENTRYPOINT ["/sbin/tini", "--"] CMD /usr/bin/php \