containers

Pyvorin in distroless Images

Minimal attack surface with compiled Python.

Published May 30, 2026

Why Distroless

Minimal attack surface. No shell, no package manager.

Dockerfile

FROM python:3.12 as builder
RUN pip install pyvorin-thin
COPY . .
RUN pyvorin compile app.py

FROM gcr.io/distroless/python3-debian12
COPY --from=builder /app /app
COPY --from=builder /root/.pyvorin/cache /root/.pyvorin/cache
WORKDIR /app
CMD ["app.py"]