We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa9ddf2 commit 7469fb3Copy full SHA for 7469fb3
Dockerfile
@@ -6,6 +6,15 @@ RUN set -ex; \
6
wget -q https://github.com/ghusta/FakeSMTP/releases/download/v${APP_VERSION}/fakeSMTP-${APP_VERSION}.jar -O fakeSMTP.jar; \
7
mv fakeSMTP.jar /opt;
8
9
+# Create a non-privileged user that the app will run under.
10
+# See https://docs.docker.com/go/dockerfile-user-best-practices/
11
+ARG UID=10001
12
+RUN useradd --no-log-init --system --uid ${UID} fakesmtp \
13
+ && usermod --append --groups mail fakesmtp
14
+# User fakesmtp is added to system group mail to be able to write to /var/mail/
15
+# See permissions : ls -ld /var/mail
16
+USER fakesmtp
17
+
18
EXPOSE 25
19
VOLUME ["/var/mail"]
20
0 commit comments