Skip to content

Commit b4c4591

Browse files
committed
📝 (Docker) Use same Dockerfile in lectures 2 and 3
Previously the Lecture 2 Dockerfile shown was more advanced and more "correct", however, we then use a different Dockerfile in practice in Lecture 3. I think it's better to use the same, slightly less good Dockerfile, throughout the section, and then introduce the "better" Dockerfile when we deploy the app and use `gunicorn`.
1 parent caaa4e3 commit b4c4591

File tree

1 file changed

+3
-3
lines changed
  • docs/docs/04_docker_intro/02_what_is_docker_image

1 file changed

+3
-3
lines changed

docs/docs/04_docker_intro/02_what_is_docker_image/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Creating a Docker image is straightforward (when you know how!). I'll guide you
88

99
```dockerfile
1010
FROM python:3.10
11+
EXPOSE 5000
1112
WORKDIR /app
12-
COPY ./requirements.txt requirements.txt
13-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
13+
RUN pip install flask
1414
COPY . .
15-
CMD ["gunicorn", "--bind", "0.0.0.0:80", "main:app"]
15+
CMD ["flask", "run", "--host", "0.0.0.0"]
1616
```
1717

1818
This is a `Dockerfile`, a definition of how to create a Docker image. Once you have this file, you can ask Docker to create the Docker image. Then, after creating the Docker image, you can ask Docker to run it as a container.

0 commit comments

Comments
 (0)