Skip to content

chore: optimize Docker image and publish latest tag on release#4

Merged
jrhuerta merged 1 commit intomainfrom
chore/docker-optimize-and-latest-tag
Mar 12, 2026
Merged

chore: optimize Docker image and publish latest tag on release#4
jrhuerta merged 1 commit intomainfrom
chore/docker-optimize-and-latest-tag

Conversation

@jrhuerta
Copy link
Owner

Summary

  • Multi-stage Docker build with venv isolation — strips pip, setuptools, and build artifacts from the final image (213MB → 183MB, ~14% reduction)
  • Trim production dependencies — change mcp[cli] to mcp since the server uses stdio transport, not the CLI tools. Drops pygments (9.2MB), rich (2.9MB), typer, click, etc. mcp[cli] moved to dev extras
  • Add .dockerignore — excludes tests, docs, .git, .env from build context
  • Publish latest tag — CI now pushes both the version tag and latest on GitHub Release
  • Update docs — README and AGENTS.md reference :latest instead of hardcoded version tags

Test plan

  • Built optimized image locally and verified all 3 MCP tools work end-to-end
  • Verified security controls: DROP blocked, SELECT * blocked (strict policy), non-policy table blocked
  • Verified published v0.1.0 GHCR image works end-to-end (prior to these changes)
  • CI passes (lint, type check, tests, Docker build)
  • Next release should push both v* and latest tags to GHCR

- Multi-stage build with venv to strip pip/setuptools from final image
- Add .dockerignore to reduce build context
- Trim mcp[cli] to mcp in production deps (move cli to dev extras)
- Clean __pycache__ from venv in builder stage
- Publish both version tag and latest on GitHub Release
- Update README/AGENTS docs to reference :latest
@jrhuerta jrhuerta merged commit 1620d7e into main Mar 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant