[PR #23562] fix: exclude dev dependencies from production Docker image #30304

Closed
opened 2026-02-21 20:47:14 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/23562

State: closed
Merged: Yes


Summary

Changes

Modified api/Dockerfile to use uv sync --locked --no-dev instead of uv sync --locked to prevent installation of development dependencies in the production image.

Impact

  • Smaller Docker image size
  • Improved security (no dev tools in production)
  • Faster build times

Test Plan

  • Build Docker image and verify dev dependencies are not installed
  • Verify production functionality remains intact
**Original Pull Request:** https://github.com/langgenius/dify/pull/23562 **State:** closed **Merged:** Yes --- ## Summary - Fixes #23561 - Excludes development dependencies (pytest, mypy, ruff, etc.) from production Docker image ## Changes Modified `api/Dockerfile` to use `uv sync --locked --no-dev` instead of `uv sync --locked` to prevent installation of development dependencies in the production image. ## Impact - ✅ Smaller Docker image size - ✅ Improved security (no dev tools in production) - ✅ Faster build times ## Test Plan - [ ] Build Docker image and verify dev dependencies are not installed - [ ] Verify production functionality remains intact
yindo added the pull-request label 2026-02-21 20:47:14 -05:00
yindo closed this issue 2026-02-21 20:47:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30304