Skip to content

Commit 28bfc20

Browse files
authored
Merge pull request #1212 from ccnmtl/django-user
Dockerfile: run application as django user instead of root
2 parents 3db9de1 + ff2c3bb commit 28bfc20

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)