Skip to content

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

Open
bcherry wants to merge 1 commit intomainfrom
bcherry/inspiring-tu
Open

feat: improve Dockerfile build performance with multi-stage builds#789
bcherry wants to merge 1 commit 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
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