Skip to content

feat: improve Dockerfile build performance with multi-stage builds#789

Merged
bcherry merged 2 commits intomainfrom
bcherry/inspiring-tu
Mar 13, 2026
Merged

feat: improve Dockerfile build performance with multi-stage builds#789
bcherry merged 2 commits intomainfrom
bcherry/inspiring-tu

Conversation

@bcherry
Copy link
Contributor

@bcherry bcherry commented Mar 11, 2026

Summary

  • Convert all Dockerfile templates (Node.js, Python UV, Python pip) to multi-stage builds
  • Eliminate expensive chown -R appuser:appuser /app calls by using COPY --from=build --chown=appuser:appuser /app /app in the production stage
  • Build tools (gcc, g++, python3-dev) excluded from final Python images
  • Pip template now uses a venv for clean multi-stage copying
  • Add coding agent files (.claude/, .cursor/, .windsurf/, etc.) to all dockerignore templates
  • Add test file patterns to dockerignore templates

Matches livekit/web#3448.

Test plan

  • go test ./pkg/agentfs/... passes

🤖 Generated with Claude Code

Convert all Dockerfile templates to multi-stage builds to eliminate
expensive `chown -R` operations. Use `COPY --from=build --chown=` to
set ownership in a single layer instead. Add venv to pip template for
clean multi-stage copying. Add coding agent files and test patterns to
dockerignore templates. Matches livekit/web#3448.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bcherry bcherry changed the title feat: add docs command and improve non-interactive mode support feat: improve Dockerfile build performance with multi-stage builds Mar 11, 2026
@bcherry bcherry marked this pull request as ready for review March 11, 2026 06:16
@bcherry bcherry merged commit 76e1770 into main Mar 13, 2026
9 checks passed
@bcherry bcherry deleted the bcherry/inspiring-tu branch March 13, 2026 18:28
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.

2 participants