Skip to content

Commit

Permalink
Update Dockerfile to run process as non-privileged user. (#3709)
Browse files Browse the repository at this point in the history
  • Loading branch information
asimons04 authored Jul 24, 2023
1 parent 102124b commit 13a866a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ RUN apk add --no-cache libpq
# Copy resources
COPY --from=builder /app/lemmy_server /app/lemmy

# Create non-privileged user
RUN adduser -h /app -s sh -S -u 1000 lemmy
RUN chown -R lemmy /app
USER lemmy

CMD ["/app/lemmy"]

0 comments on commit 13a866a

Please sign in to comment.