1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-14 10:25:30 +00:00
terraform-playground/pymage/example/README.md
Jason Hall d587263759 lots of changes
Signed-off-by: Jason Hall <jason.hall@anysphere.co>
2026-06-10 17:05:36 -04:00

1 KiB

pymage example

A small uv project with a realistic FastAPI dependency tree (~28 wheels). Use it to try pymage end-to-end.

Build

From the pymage module root (network required on first build to download wheels):

cd pymage
go run . build ./example \
  --push=false \
  --print-digest

Push to a registry. The base image and target platforms come from the [tool.pymage] table in pyproject.toml; supply the destination repo with --repo (or uncomment repo in that table) and the tag with -t:

go run . build ./example --repo registry.example.com/me/example -t latest

Defaults apply automatically:

  • uv.lock in the source directory (the positional arg)
  • [tool.pymage] base (cgr.dev/chainguard/python:latest, Python 3.14) and platforms (linux/amd64, linux/arm64)
  • [project.scripts] entrypoint (example)
  • PYTHONPATH=/app/src for the src layout

Run locally with uv

cd example
uv sync
uv run example
curl localhost:8080/healthz