Test and check Python code with uv, pytest, Behave, Ruff, and mypy.
755
Test and check Python code with uv, pytest, Behave, Ruff, and mypy.
This image contains Python, pip, uv, pytest, Behave, Ruff, and mypy. Use it for course
tasks, local checks, and CI jobs. The base image is python:latest. The working directory is
/workspace. The default command starts Bash.
| Tag | Meaning | Platform |
|---|---|---|
latest | Latest successful build from main. | linux/amd64 |
View all tags on Docker Hub.
The latest tag changes when a new build passes its tests.
docker pull stden/python:latest
Run these commands from your project directory:
docker run --rm -v "$PWD":/workspace stden/python:latest pytest
docker run --rm -v "$PWD":/workspace stden/python:latest behave
docker run --rm -v "$PWD":/workspace stden/python:latest ruff check .
docker run --rm -v "$PWD":/workspace stden/python:latest mypy .
The image does not include your project dependencies. If your project has a requirements file, install them before the tests:
docker run --rm -v "$PWD":/workspace stden/python:latest \
bash -c 'python -m pip install -r requirements.txt && pytest'
For a project with pyproject.toml and uv.lock, uv installs the locked
dependencies in a few seconds:
docker run --rm -v "$PWD":/workspace stden/python:latest \
bash -c 'uv sync --frozen && uv run pytest'
The mount keeps reports and other output in your project directory. Packages that
you install in this container do not stay after the container exits. For repeated
use, install your dependencies in a Dockerfile that starts with
FROM stden/python:latest.
The image smoke test checks Python, uv, pytest, Behave, Ruff, and mypy.
Content type
Image
Digest
sha256:d2ad36dc1…
Size
455.8 MB
Last updated
1 day ago
docker pull stden/python