Skip to content

Commit a837f9d

Browse files
committed
improve consistency in Dockerfile CMD
remove /venv/bin as it's redundant and inconsistent with the earlier versions of the Dockerfile in the chapter
1 parent c94a2a6 commit a837f9d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

chapter_09_docker.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,9 +1313,12 @@ If you try it, you'll find it certainly fixes the problem:
13131313
WORKDIR /src
13141314
13151315
RUN python manage.py migrate --noinput <1>
1316-
CMD /venv/bin/python manage.py runserver
1316+
CMD python manage.py runserver
13171317
----
13181318
====
1319+
// CSANAD: I prefer specifying the path (/venv/bin/python) too, but we already set the PATH to in-
1320+
// clude /venv/bin and also, we haven't been using this explicit path in the Dockerfile.
1321+
// So, for the sake of consistency, I suggest removing it here as well.
13191322

13201323
<1> We run `migrate` using the `--noinput` argument to suppress any little "are you sure" prompts.
13211324

@@ -1363,7 +1366,7 @@ First let's revert our change:
13631366
[...]
13641367
WORKDIR /src
13651368
1366-
CMD /venv/bin/python manage.py runserver
1369+
CMD python manage.py runserver
13671370
----
13681371
====
13691372

0 commit comments

Comments
 (0)