Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: '3.8'

services:
python39-linux:
image: python:3.9
python310-linux:
image: python:3.10
volumes:
- .:/app
- ..:/app
working_dir: /app
command: bash -c "pip install . && pip install -r requirements-tests.txt && pytest && cd rocketpy && pytest --doctest-modules"
logging:
Expand All @@ -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:
Expand Down
13 changes: 8 additions & 5 deletions docs/development/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
Loading