[FEAT] Install BookStack's composer dependencies with --no-dev
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, php
- Lĩnh vực
- build-system, devops
Hướng nghiên cứu
Cả Dockerfile và Dockerfile.aarch64 đều chạy composer install ở dòng 48; hãy thêm --no-dev tại đó, giữ nguyên phần còn lại của layer. Sau đó build image và chạy composer show hoặc một scanner như syft/grype bên trong nó để xác nhận rằng phpunit, larastan và phpstan đã biến mất khỏi /app/www/vendor. Hoàn tất nghĩa là cả hai Dockerfile khớp nhau và container BookStack vẫn khởi động và phục vụ wiki.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is this a new feature request?
- I have searched the existing issues
Wanted change
Install BookStack's composer dependencies with --no-dev. The image runs composer install -d /app/www/ without it, so BookStack's development dependencies ship in it: phpunit, larastan and with it phpstan, whose vendor/phpstan/phpstan/turbo-ext/ holds native extensions for every platform, among them Windows DLLs built against PHP 8.3 to 8.6.
Reason for change
Container scanners (syft and grype here) read the PHP versions out of those DLLs and report PHP's vulnerabilities, CVE-2026-109618 and CVE-2026-109619 among them, in an image whose PHP (php85 8.5.12-r0 in 26.09.2) is not affected. Every user of a scanner has to ignore them by hand.
BookStack's own installation guide runs composer install --no-dev.
The Snipe-IT image made the same change in linuxserver/docker-snipe-it#39 and still installs with --no-dev.
Proposed code change
In both Dockerfile and Dockerfile.aarch64, line 48:
- composer install -d /app/www/ && \
- composer install --no-dev -d /app/www/ && \
- Ngôn ngữ chính
- Dockerfile
- Star
- 1k
- Fork
- 140
- Merge trung bình
- 3 giờ 29 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxserver/docker-bookstack
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
linuxserver/docker-bookstack#296 · 5 bình luận ·
Tất cả issue của linuxserver/docker-bookstack
Issue tương tự
-
bug dependencies kind:fix priority: P3 ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
shep-pm/shep#1318 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
awslabs/visual-asset-management-system#880 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
flathub/com.valvesoftware.Steam.CompatibilityTool.Proton-GE#281 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
flathub/com.hamrick.VueScan#1798 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100