Skip to content

Commit 7acb157

Browse files
committed
Dockerfile: run application as django user instead of root
1 parent c6193ac commit 7acb157

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ COPY ["package*.json","./"]
2222

2323
RUN npm install
2424
RUN npm run build:prod
25+
2526
EXPOSE 8000
26-
RUN chmod u+x entrypoint.sh
2727

28+
RUN adduser --system --group django
29+
RUN chown -R django:django /src
30+
31+
USER django
32+
33+
RUN chmod u+x entrypoint.sh
2834
CMD ["./entrypoint.sh"]

0 commit comments

Comments
 (0)