Skip to content

Commit 4ea1cc9

Browse files
committed
add comment on requirements and user in Dockerfile
1 parent da925d8 commit 4ea1cc9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

chapter_09_docker.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,14 @@ CMD python manage.py runserver
780780
(this is actually one of the things that `activate` does, under the hood).
781781

782782
<3> We copy our requirements file in, just like the src folder.
783+
// CSANAD: It's fine for now, but I would definitely put the requirements under
784+
// /tmp and then `rm` it after `pip install`. Also, using a non-privileged
785+
// user is important, something like:
786+
// `adduser --no-create-home --disabled-password todoapp`
787+
// and then setting the user in the Dockerfile with `USER todoapp`.
788+
// But we can cover this in a later chapter (the next one looks like a good fit,
789+
// since it's related to the app being production ready).
790+
783791

784792
<4> Now we install our dependencies with `pip`,
785793
pointing it at our _requirements.txt_.

0 commit comments

Comments
 (0)