Skip to content

Commit ba9a13d

Browse files
BixilonBios-Marcel
andauthored
docker: don't run executable as root (#378)
The image now runs with user and group 248, which is just a random number, no user or group with that ID exist by default. --------- Co-authored-by: The King of Half-Baked Projects <[email protected]>
1 parent a606331 commit ba9a13d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

fly.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ COPY --from=builder /app/scribblers /scribblers
3636
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
3737

3838
ENTRYPOINT ["/scribblers"]
39+
# Random uid to avoid having root privileges. Linux doesn't care that there's no user for it.
40+
USER 248:248

linux.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ COPY --from=builder /app/scribblers /scribblers
3333
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
3434

3535
ENTRYPOINT ["/scribblers"]
36+
# Random uid to avoid having root privileges. Linux doesn't care that there's no user for it.
37+
USER 248:248

0 commit comments

Comments
 (0)