Expand description
Docker integration for Python projects
Generate Dockerfiles and build images from [tool.rx.docker] config:
[tool.rx.docker]
base-image = "python:3.11-slim"
python-version = "3.11"
entrypoint = ["python", "-m", "myapp"]
cmd = ["--help"]
expose = [8000]
env = { APP_ENV = "production" }
copy = ["src/", "config/"]
workdir = "/app"
user = "appuser"
labels = { maintainer = "dev@example.com" }
apt-packages = ["curl", "gcc"]
build-args = { PIP_NO_CACHE_DIR = "1" }
multi-stage = trueStructs§
- Docker
Config - Docker configuration from pyproject.toml
- Dockerfile
Generator - Dockerfile generator
Functions§
- build_
image - Build a Docker image