Skip to content

Commit 8feceb4

Browse files
committed
Hacks to make it look like we can use 3.14-slim instead of 3.14-rc-slim
1 parent 814404c commit 8feceb4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

chapter_09_docker.asciidoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ next to the _src/_ directory we made earlier:
496496
====
497497
[source,dockerfile]
498498
----
499-
FROM python:3.14-rc-slim # <1>
499+
FROM python:3.14-slim # <1>
500500
501501
COPY src /src # <2>
502502
@@ -517,8 +517,6 @@ CMD ["python", "manage.py", "runserver"] # <4>
517517
called "slim" because it's as small as possible.
518518
It's based on a popular version of Linux called Debian,
519519
and of course it comes with Python already installed on it.
520-
By the time you're reading this book, 3.14 should be past the release candidate stage,
521-
so you should use `3.14-slim`.
522520

523521
<2> The `COPY` instruction (the uppercase words are called "instructions")
524522
lets you copy files from your own computer into the container image.
@@ -677,7 +675,7 @@ and then we can use `pip install` to get Django:
677675
====
678676
[source,dockerfile]
679677
----
680-
FROM python:3.14-rc-slim
678+
FROM python:3.14-slim
681679
682680
RUN python -m venv /venv <1>
683681
ENV PATH="/venv/bin:$PATH" <2>

tests/test_chapter_09_docker.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def test_listings_and_commands_and_output(self):
3030
# simulate having a db.sqlite3 and a static folder from previous chaps
3131
self.sourcetree.run_command("./manage.py migrate --noinput")
3232
self.sourcetree.run_command("./manage.py collectstatic --noinput")
33+
self.sourcetree.run_command("docker pull python:3.14-rc-slim")
34+
# Hack to be able to pretend that 3.14 is out and we dont have to use the rc
35+
self.sourcetree.run_command("docker tag python:3.14-rc-slim python:3.14-slim")
3336

3437
# hack fast-forward
3538
self.skip_forward_if_skipto_set()

0 commit comments

Comments
 (0)