Skip to content

Commit 90c9130

Browse files
Add example dockerfile with instructions (#32)
* Add example dockerfile with instructions * Fix
1 parent 838fb4a commit 90c9130

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/cloud_operations/docker/docker-basics.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,3 +907,46 @@ This note is here then to give credits to the teams that created the above resou
907907
information on Docker and other things, feel free to check them out!
908908

909909
:::
910+
911+
## Example Dockerfile
912+
913+
```text
914+
915+
FROM python:3.13.6-alpine
916+
917+
WORKDIR /application
918+
919+
COPY server.py /application
920+
921+
COPY requirements.txt /application
922+
923+
RUN pip install -r requirements.txt
924+
925+
EXPOSE 5000
926+
927+
CMD [ "python3", "server.py"]
928+
929+
# 1. Plecam de la o imagine care are cat mai multe dependinte din ce ne trebuie noua
930+
# 2. Copiem fisierele necesare aplicatiei noastra
931+
# 3. Instalam eventuale dependinte
932+
# 4. Realizam eventuale configurari pentru a porni aplicatia
933+
# 5. Specificam comanda default care porneste aplicatie in momentul in care containerul este up and
934+
# running
935+
936+
```
937+
938+
```text
939+
940+
The hierarchy where the Dockerfile is located looks like this:
941+
942+
.
943+
├── Dockerfile
944+
├── requirements.txt
945+
├── server.py
946+
└── venv (for testing purposes)
947+
├── bin
948+
├── include
949+
├── lib
950+
└── pyvenv.cfg
951+
952+
```

0 commit comments

Comments
 (0)