This is a Python Docker image based on the Python Alpine Linux docker image.
2026-09-07
2026-07-01
2026-06-14
2026-05-16
2026-04-17
export APP_NAME=app
Regular build
docker build --pull --no-cache -t aviumlabs/python:3.14-alpine .
Build with sbom and provenance
docker build --pull --no-cache -t aviumlabs/python:3.14-alpine --provenance=mode=max --sbom=true .
export APP_NAME=myapp
Regular build
docker build --pull --no-cache -t aviumlabs/python:3.14-alpine --build-arg APP_NAME=$APP_NAME .
Build with sbom and provenance
docker build --pull --no-cache -t aviumlabs/python:3.14-alpine --build-arg APP_NAME=$APP_NAME --provenance=mode=max --sbom=true .
Run container in the foreground:
docker run --name $APP_NAME -it -e APP_NAME=$APP_NAME --rm -w "/opt/python/$APP_NAME" --mount type=bind,src="$(pwd)/src",target="/opt/python/$APP_NAME" --mount type=bind,src="$(pwd)/tests",target="/opt/python/tests" --mount type=bind,src="$(pwd)/dist",target="/opt/python/dist" aviumlabs/python:3.14-alpine
docker run --name $APP_NAME -it -e APP_NAME=$APP_NAME --rm -w "/opt/python/$APP_NAME" --mount type=bind,src="$(pwd)/src",target="/opt/python/$APP_NAME" --mount type=bind,src="$(pwd)/tests",target="/opt/python/tests" --mount type=bind,src="$(pwd)/dist",target="/opt/python/dist" aviumlabs/python:3.14-alpine
Open an additional container shell:
docker exec -it app /bin/ash
The src directory is bind mounted into the Docker container and the container provides the Python runtime environment.
There are two supporting scripts that provide aliases for running python
commands in the docker container:
The three aliases are:
If you need to run pip, python, or pytest in the container, source the
alias file prior to running the command:
. ./.appdev
. .\.appdev.ps1
The included requirements.txt file installs the following python packages
and their dependencies:
This file may be deleted and recreated with project specific requirements.
There are two methods for adding additional packages.
To install Python packages with pip:
. ./.appdev
pip install <package>
pip freeze > requirements.txt
The appdev PowerShell script has not been tested. Please file an issue if it does not work.
. .\.appdev.ps1
pip install <package>
pip freeze > requirements.txt
Modify the pyproject.toml file to meet your requirements.
Recommendation is to not use spaces or special characters in the name and keep it short.
All of the code for the application is in the src/ directory and it is
stored on your computer's local filesystem and not in the docker container.
Use your favorite editor to write your application code.
The environment has built in support for building a package. The dist
directory is bind mounted into the container, and running build will
create a python package in the dist directory on your local filesystem.
. ./.appdev
python -m build
The environment has integrated support for pytest. Create your test
files in the tests directory and run pytest in the docker container.
. ./.appdev
Run standard pytest:
pytest
Run pytest and print output:
pytest -s
To run specific test file with output:
pytest -s tests/test_<file_name>.py
docker push aviumlabs/python:3.14-alpine
Content type
Image
Digest
sha256:ae267c446…
Size
38.2 MB
Last updated
10 days ago
docker pull aviumlabs/python:3.14-alpine