Skip to content

Commit 36c3d05

Browse files
committed
add a placeholder for a bit on nonroot user
1 parent d60252d commit 36c3d05

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

chapter_10_production_readiness.asciidoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,21 @@ $ *git commit -am "Add collectstatic to dockerfile, and new location to gitignor
660660
----
661661

662662

663+
=== Switching to a nonroot user
664+
665+
TODO: this is definitely a good idea for security, needs writing up.
666+
667+
Dockerfile should gain some lines a bit like this:
668+
669+
.Dockerfile (ch10l0XX)
670+
====
671+
[source,dockerfile]
672+
----
673+
RUN addgroup --system nonroot && adduser --system --group nonroot
674+
675+
USER nonroot
676+
----
677+
663678
664679
665680
=== Configuring logging

0 commit comments

Comments
 (0)