Skip to content

Commit 8f2fe7c

Browse files
author
Marius Benthin
committed
update: set fixed UID/GID
1 parent 4117b46 commit 8f2fe7c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Containerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ ENV TEMP_DIR="/tmp/thunderstorm"
99
ENV TARGET_DIR="/opt/nextron/thunderstorm"
1010
ENV UPLOAD_DIR="$TEMP_DIR/uploads"
1111

12-
# create directories and user
13-
RUN mkdir -p \
12+
# create user, group and directories
13+
RUN addgroup -g 1000 -S thunderstorm && \
14+
adduser -S -H -D -u 1000 -G thunderstorm -g "Thunderstorm User" thunderstorm && \
15+
mkdir -p \
1416
"$TEMP_DIR" \
1517
"$TEMP_DIR/.persisted-uploads" \
1618
"$TEMP_DIR/logs" \
@@ -21,8 +23,7 @@ RUN mkdir -p \
2123
"$TARGET_DIR/signatures" \
2224
"$TARGET_DIR/custom-signatures" \
2325
"$UPLOAD_DIR" && \
24-
adduser -S -H -D -g "Thunderstorm User" thunderstorm && \
25-
chown -R thunderstorm "$TEMP_DIR" "$TARGET_DIR"
26+
chown -R thunderstorm:thunderstorm "$TEMP_DIR" "$TARGET_DIR"
2627

2728
# copy unified entrypoint script
2829
COPY entrypoint.sh /entrypoint.sh

0 commit comments

Comments
 (0)