From ceb8000106f1d8039a4932e84a1ab560a9af78b0 Mon Sep 17 00:00:00 2001 From: Sujeito Operator Date: Tue, 11 Aug 2026 07:20:36 +0200 Subject: [PATCH 1/4] docker: mount the repository root in compose, not the docker folder #732 moved docker-compose.yml into docker/. Compose resolves relative host paths against the compose file's own directory, so `- .:/app` mounts docker/, which has no pyproject.toml and no requirements-tests.txt for the services to install. --- docker/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 244b9dcff..b7d9b133f 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -4,7 +4,7 @@ services: python39-linux: image: python:3.9 volumes: - - .:/app + - ..:/app working_dir: /app command: bash -c "pip install . && pip install -r requirements-tests.txt && pytest && cd rocketpy && pytest --doctest-modules" logging: @@ -15,7 +15,7 @@ services: python312-linux: image: python:3.12 volumes: - - .:/app + - ..:/app working_dir: /app command: bash -c "pip install . && pip install -r requirements-tests.txt && pytest && cd rocketpy && pytest --doctest-modules" logging: From 24f66ce5a9c3de6fcdad1c4e158a7561019c66f9 Mon Sep 17 00:00:00 2001 From: Sujeito Operator Date: Tue, 11 Aug 2026 07:20:37 +0200 Subject: [PATCH 2/4] docker: raise the compose service to the python floor the package declares #857 moved requires-python to >=3.10; pip declines the install on 3.9. Renamed the service key so it does not outlive the version again. --- docker/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b7d9b133f..17918c487 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,8 +1,8 @@ version: '3.8' services: - python39-linux: - image: python:3.9 + python310-linux: + image: python:3.10 volumes: - ..:/app working_dir: /app From 6c07c85b7a8e03bea3f2d6d6268d062bbc74ab92 Mon Sep 17 00:00:00 2001 From: Sujeito Operator Date: Tue, 11 Aug 2026 07:20:38 +0200 Subject: [PATCH 3/4] docker: pin the base image to python:3.14 python:latest and python:3.14 are the same digest today, so the image does not change. 3.14 is the ceiling of the test matrix, and a pinned tag is one renovate can see and bump. --- docker/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 34553e2ed..4c4065d91 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,8 @@ # Set base image -# python:latest will get the latest version of python, on linux +# python:3.14 is the newest version the test matrix covers, and is what the +# python:latest tag resolves to today. Pinning keeps the two from drifting apart. # Get a full list of python images here: https://hub.docker.com/_/python/tags -FROM python:latest +FROM python:3.14 # set the working directory in the container WORKDIR /RocketPy From 62300cef1af41db7383b6dd27699029fa07a7141 Mon Sep 17 00:00:00 2001 From: Sujeito Operator Date: Tue, 11 Aug 2026 07:20:39 +0200 Subject: [PATCH 4/4] docs: describe the docker layout as it is after #732 The build command needs a repository-root context to find requirements.txt, compose runs from inside docker/, and the file tests 3.10 and 3.12 rather than 3.9 and 3.12. --- docs/development/docker.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/development/docker.rst b/docs/development/docker.rst index bc1de8745..be36ada77 100644 --- a/docs/development/docker.rst +++ b/docs/development/docker.rst @@ -37,11 +37,13 @@ Before you start, you need to install on your machine: Build the image ---------------- -To build the image, run the following command on your terminal: +To build the image, run the following command from the root of the repository +(the ``Dockerfile`` copies ``requirements.txt``, so the build context has to +be the repository, not the ``docker`` folder): .. code-block:: console - docker build -t rocketpy-image -f Dockerfile . + docker build -t rocketpy-image -f docker/Dockerfile . This will build the image and tag it as ``rocketpy-image`` (you can apply another @@ -108,10 +110,11 @@ operational system. However, it is still useful to run the unit tests on different python versions. Currently, the ``docker-compose.yml`` file is configured to run the unit tests -on python 3.9 and 3.12. +on python 3.10 and 3.12. To run the unit tests on both python versions, run the following command -**on your machine**: +**on your machine**, from inside the ``docker`` folder (the services mount +the repository root, one level up, as ``/app``): .. code-block:: console @@ -155,7 +158,7 @@ For example, to use a Windows-based image, you might change: .. code-block:: Dockerfile - FROM python:latest + FROM python:3.14 to