Skip to content

Commit

Permalink
fix : add non-root user in docker file (#580)
Browse files Browse the repository at this point in the history
* fix : add a new user in optimus docker image

* fix: create user with default settings

Co-authored-by: Yash Bhardwaj <[email protected]>
  • Loading branch information
2 people authored and sravankorumilli committed Sep 9, 2022
1 parent e8df06b commit 2c03789
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
FROM alpine:3.13
ARG USER=optimus

COPY optimus /usr/bin/optimus
WORKDIR /app

RUN adduser -D $USER
RUN chown -R $USER:$USER /app

USER $USER
EXPOSE 8080
CMD ["optimus"]

0 comments on commit 2c03789

Please sign in to comment.