@@ -18,7 +18,7 @@ In this tutorial we will use:
1818
1919- Python 3
2020- Docker
21- - Docker-compose
21+ - Docker Compose
2222
2323Start from the scratch or jump to the section:
2424
@@ -47,28 +47,27 @@ response it will log:
4747Prerequisites
4848-------------
4949
50- We will use `Docker <https://www.docker.com/ >`_ and
51- `docker-compose <https://docs.docker.com/compose/ >`_ in this tutorial. Let's check the versions:
50+ We will use `docker compose <https://docs.docker.com/compose/ >`_ in this tutorial. Let's check the versions:
5251
5352.. code-block :: bash
5453
5554 docker --version
56- docker- compose -- version
55+ docker compose version
5756
5857 The output should look something like:
5958
6059.. code-block :: bash
6160
62- Docker version 20.10.5 , build 55c4c88
63- docker-compose version 1 .29.0, build 07737305
61+ Docker version 27.3.1 , build ce12230
62+ Docker Compose version v2 .29.7
6463
6564 .. note ::
6665
67- If you don't have ``Docker `` or ``docker- compose `` you need to install them before proceeding.
66+ If you don't have ``Docker `` or ``docker compose `` you need to install them before proceeding.
6867 Follow these installation guides:
6968
7069 - `Install Docker <https://docs.docker.com/get-docker/ >`_
71- - `Install docker- compose <https://docs.docker.com/compose/install/ >`_
70+ - `Install docker compose <https://docs.docker.com/compose/install/ >`_
7271
7372The prerequisites are satisfied. Let's get started with the project layout.
7473
@@ -129,13 +128,13 @@ Put next lines into the ``requirements.txt`` file:
129128 pytest-cov
130129
131130 Second, we need to create the ``Dockerfile ``. It will describe the daemon's build process and
132- specify how to run it. We will use ``python:3.9-buster `` as a base image.
131+ specify how to run it. We will use ``python:3.13-bookworm `` as a base image.
133132
134133Put next lines into the ``Dockerfile `` file:
135134
136135.. code-block :: bash
137136
138- FROM python:3.10-buster
137+ FROM python:3.13-bookworm
139138
140139 ENV PYTHONUNBUFFERED=1
141140
@@ -155,8 +154,6 @@ Put next lines into the ``docker-compose.yml`` file:
155154
156155.. code-block :: yaml
157156
158- version : " 3.7"
159-
160157 services :
161158
162159 monitor :
@@ -171,7 +168,7 @@ Run in the terminal:
171168
172169.. code-block :: bash
173170
174- docker- compose build
171+ docker compose build
175172
176173 The build process may take a couple of minutes. You should see something like this in the end:
177174
@@ -184,7 +181,7 @@ After the build is done run the container:
184181
185182.. code-block :: bash
186183
187- docker- compose up
184+ docker compose up
188185
189186 The output should look like:
190187
@@ -461,7 +458,7 @@ Run in the terminal:
461458
462459.. code-block :: bash
463460
464- docker- compose up
461+ docker compose up
465462
466463 The output should look like:
467464
@@ -705,7 +702,7 @@ Run in the terminal:
705702
706703.. code-block :: bash
707704
708- docker- compose up
705+ docker compose up
709706
710707 You should see:
711708
@@ -813,7 +810,7 @@ Run in the terminal:
813810
814811.. code-block :: bash
815812
816- docker- compose up
813+ docker compose up
817814
818815 You should see:
819816
@@ -965,15 +962,16 @@ Run in the terminal:
965962
966963.. code-block :: bash
967964
968- docker- compose run --rm monitor py.test monitoringdaemon/tests.py --cov=monitoringdaemon
965+ docker compose run --rm monitor py.test monitoringdaemon/tests.py --cov=monitoringdaemon
969966
970967 You should see:
971968
972969.. code-block :: bash
973970
974- platform linux -- Python 3.10.0 , pytest-6.2.5, py-1.10.0, pluggy-1.0 .0
971+ platform linux -- Python 3.13.1 , pytest-8.3.4, pluggy-1.5 .0
975972 rootdir: /code
976- plugins: asyncio-0.16.0, cov-3.0.0
973+ plugins: cov-6.0.0, asyncio-0.24.0
974+ asyncio: mode=Mode.STRICT, default_loop_scope=None
977975 collected 2 items
978976
979977 monitoringdaemon/tests.py .. [100%]
0 commit comments