Docker setup and multi-stage build #7

Open
opened 2026-08-23 11:17:29 +02:00 by gaetan · 0 comments
Owner

Part of #1

Question

Design the Docker setup for the single-container bookshelf app. Key decisions:

  • Multi-stage build: Build stage (Go compiler) → runtime stage (distroless/alpine/minimal)
  • Runtime image: Which base image? (gcr.io/distroless/static, alpine, debian-slim)?
  • Static assets: How to embed templ-generated HTML and PicoCSS into the Go binary? (go:embed?)
  • Database persistence: Volume mount for the SQLite file so data survives container restarts
  • Entrypoint: What command runs the server? Any health check?
  • Build context: What gets copied into the image? (Only compiled binary + embedded assets, or the whole repo?)
  • docker-compose: Single docker-compose.yml or just Dockerfile + run command?

The goal: a minimal, secure, fast-starting container.

Part of #1 ## Question Design the Docker setup for the single-container bookshelf app. Key decisions: - **Multi-stage build**: Build stage (Go compiler) → runtime stage (distroless/alpine/minimal) - **Runtime image**: Which base image? (`gcr.io/distroless/static`, `alpine`, `debian-slim`)? - **Static assets**: How to embed templ-generated HTML and PicoCSS into the Go binary? (`go:embed`?) - **Database persistence**: Volume mount for the SQLite file so data survives container restarts - **Entrypoint**: What command runs the server? Any health check? - **Build context**: What gets copied into the image? (Only compiled binary + embedded assets, or the whole repo?) - **docker-compose**: Single `docker-compose.yml` or just `Dockerfile` + run command? The goal: a minimal, secure, fast-starting container.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gaetan/Argus#7
No description provided.