From a90e2d09c2665783fd514a50288f05d1735f1542 Mon Sep 17 00:00:00 2001 From: cristian-paris Date: Mon, 18 Aug 2025 11:16:56 +0300 Subject: [PATCH 1/2] Add example dockerfile with instructions --- docs/cloud_operations/docker/docker-basics.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/cloud_operations/docker/docker-basics.md b/docs/cloud_operations/docker/docker-basics.md index 793e372..eb483ee 100644 --- a/docs/cloud_operations/docker/docker-basics.md +++ b/docs/cloud_operations/docker/docker-basics.md @@ -907,3 +907,45 @@ This note is here then to give credits to the teams that created the above resou information on Docker and other things, feel free to check them out! ::: + +## Example Dockerfile + +```text + +FROM python:3.13.6-alpine + +WORKDIR /application + +COPY server.py /application + +COPY requirements.txt /application + +RUN pip install -r requirements.txt + +EXPOSE 5000 + +CMD [ "python3", "server.py"] + +# 1. Plecam de la o imagine care are cat mai multe dependinte din ce ne trebuie noua +# 2. Copiem fisierele necesare aplicatiei noastra +# 3. Instalam eventuale dependinte +# 4. Realizam eventuale configurari pentru a porni aplicatia +# 5. Specificam comanda default care porneste aplicatie in momentul in care containerul este up and +# running + + +```text + +The hierarchy where the Dockerfile is located looks like this: + +. +├── Dockerfile +├── requirements.txt +├── server.py +└── venv (for testing purposes) + ├── bin + ├── include + ├── lib + └── pyvenv.cfg + +``` From 6d246b15b03f5b4475ec19d2721917b458347183 Mon Sep 17 00:00:00 2001 From: cristian-paris Date: Mon, 18 Aug 2025 11:22:52 +0300 Subject: [PATCH 2/2] Fix --- docs/cloud_operations/docker/docker-basics.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/cloud_operations/docker/docker-basics.md b/docs/cloud_operations/docker/docker-basics.md index eb483ee..45aefce 100644 --- a/docs/cloud_operations/docker/docker-basics.md +++ b/docs/cloud_operations/docker/docker-basics.md @@ -933,6 +933,7 @@ CMD [ "python3", "server.py"] # 5. Specificam comanda default care porneste aplicatie in momentul in care containerul este up and # running +``` ```text