-
Notifications
You must be signed in to change notification settings - Fork 7
Distroless refactor #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v14.x
Are you sure you want to change the base?
Conversation
WalkthroughThe PR switches base images from phpexperts/php to phpexperts/php-ubuntu across Dockerfiles, expands distroless file collection, restructures image build scripts to focus on PHP 8.4 with added distroless/web asset handling, replaces supervisord with a bash-based entrypoint for web, updates initial port selection logic, and refreshes README PHP version details. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant Build as build-images.sh
participant Base as Base Dockerfiles
participant Dist as Distroless Builder
participant Web as Web Dockerfile
Dev->>Build: Invoke build for PHP 8.4
Build->>Base: Build base images FROM phpexperts/php-ubuntu:8.4
Build->>Dist: Build distroless image
Dist-->>Build: Tag distroless as main<br/>(retag full to php-full, remove old tag)
Build->>Web: Prepare .build-assets and build web image
Web-->>Build: Copy grabbed files and assets into final image
Build-->>Dev: Push/tag images per new scheme
note over Build,Dist: Oracle paths skipped/commented
sequenceDiagram
autonumber
participant User as Container Runtime
participant Entry as web/entrypoint.sh
participant FPM as php-fpm
participant Nginx as nginx
User->>Entry: Start container
Entry->>FPM: Launch php-fpm (bg)
Entry->>Nginx: Launch nginx (bg)
Entry->>Entry: Trap SIGTERM/SIGINT for cleanup
Entry-->>User: Wait for first child to exit
alt Termination
User->>Entry: SIGTERM/SIGINT
Entry->>FPM: kill
Entry->>Nginx: kill
Entry-->>User: Exit with child status
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
README.md
(1 hunks)docker/build-distroless.sh
(1 hunks)docker/build-images.sh
(3 hunks)docker/images/base-debug/Dockerfile
(1 hunks)docker/images/base-full/Dockerfile
(1 hunks)docker/images/base-ioncube/Dockerfile
(1 hunks)docker/images/base-oracle/Dockerfile
(1 hunks)docker/images/distroless/Dockerfile
(1 hunks)docker/images/distroless/grab_files.sh
(2 hunks)docker/images/web/Dockerfile
(2 hunks)docker/images/web/entrypoint.sh
(2 hunks)docker/images/web/grab_files.sh
(1 hunks)install.php
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.11.0)
docker/images/web/grab_files.sh
[warning] 30-30: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 31-31: Quote this to prevent word splitting.
(SC2046)
[warning] 48-48: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 73-73: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 74-74: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 75-75: Quote this to prevent word splitting.
(SC2046)
[warning] 83-83: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 84-84: Quote this to prevent word splitting.
(SC2046)
🪛 Hadolint (2.14.0)
docker/images/web/Dockerfile
[error] 56-56: Use COPY instead of ADD for files and folders
(DL3020)
Summary by CodeRabbit