Sign inSign up

minhle202/fastapi

By minhle202

Updated 4 months ago

Python 3.12 + FastAPI + Uvicorn REST API starter (multi-arch amd64/arm64, non-root, /docs)

Image
0

195

minhle202/fastapi repository overview

minhle202/fastapi

A production-grade Python 3.12 + FastAPI + Uvicorn REST API starter image, part of the branded starter-image family by Lê Đức Minh. Pull it and you get a clean, non-root, multi-stage FastAPI service with a health check and auto-generated OpenAPI docs — ready in seconds.

Supported tags

  • latest — current stable build. Multi-arch: linux/amd64 + linux/arm64 (the right variant is pulled automatically on Intel/AMD and Apple Silicon/ARM).

Quick start

docker run --rm -p 8000:8000 minhle202/fastapi

Listens on port 8000 (override with the PORT env var).

curl http://localhost:8000/
curl http://localhost:8000/health
curl "http://localhost:8000/api/hello?name=Minh"

Endpoints

  • GET / — service metadata: name, version, and list of endpoints.
  • GET /health{ "status": "ok", "uptime": <seconds since start> }.
  • GET /api/hello?name={ "message": "Hello, <name>!" } (name defaults to world).
  • GET /docs — interactive Swagger UI, auto-generated by FastAPI (raw schema at /openapi.json).

Features

  • Python 3.12-slim base — small and current.
  • Multi-stage build: deps isolated in a virtualenv, only /opt/venv copied into the slim runtime image.
  • Runs as a non-root user (uid 10001).
  • Built-in HEALTHCHECK polling /health.
  • Uvicorn handles SIGTERM for graceful shutdown on docker stop.

Source

https://github.com/DucMinhNe/docker-fastapi — MIT License © 2026 Lê Đức Minh.

Tag summary

Content type

Image

Digest

sha256:071e05bef

Size

56.2 MB

Last updated

4 months ago

docker pull minhle202/fastapi