From 723ac82dfe82ae6caae9f8b5247f61d21bd7e5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 12 Nov 2025 17:11:22 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=EF=B8=8F=20Add=20Dockerfile=20example?= =?UTF-8?q?=20before=20starting=20to=20write=20our=20own?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/Building_Images_With_Dockerfiles.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/slides/containers/Building_Images_With_Dockerfiles.md b/slides/containers/Building_Images_With_Dockerfiles.md index 38acaece..0a23be46 100644 --- a/slides/containers/Building_Images_With_Dockerfiles.md +++ b/slides/containers/Building_Images_With_Dockerfiles.md @@ -29,6 +29,20 @@ At the end of this lesson, you will be able to: --- +## `Dockerfile` example + +``` +FROM python:alpine +WORKDIR /app +RUN pip install Flask +COPY rng.py . +ENV FLASK_APP=rng FLASK_RUN_HOST=:: FLASK_RUN_PORT=80 +CMD ["flask", "run"] +EXPOSE 80 +``` + +--- + ## Writing our first `Dockerfile` Our Dockerfile must be in a **new, empty directory**.