-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Run as non root and adjust docs
- Loading branch information
Showing
2 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
FROM ubuntu:latest as user_stage | ||
RUN useradd -u 10001 gorge | ||
|
||
FROM scratch | ||
ENV HOME /home/gorge | ||
USER 10001 | ||
FROM alpine:3.20 | ||
RUN adduser -k /dev/null -u 10001 -D gorge \ | ||
&& chgrp 0 /home/gorge \ | ||
&& chmod -R g+rwX /home/gorge | ||
COPY gorge / | ||
COPY --from=user_stage /etc/passwd /etc/passwd | ||
USER 10001 | ||
VOLUME [ "/home/gorge" ] | ||
ENTRYPOINT ["/gorge"] | ||
CMD ["serve"] | ||
CMD [ "serve" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters