- Notifications
You must be signed in to change notification settings - Fork20
Refactor Dockerfile to use templates#11
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
guillaume-sainthillier wants to merge1 commit intomainChoose a base branch fromclaude/dockerfile-templates-01J3urTGADGc3AH56tmCiVpY
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
Refactor Dockerfile to use templates#11
guillaume-sainthillier wants to merge1 commit intomainfromclaude/dockerfile-templates-01J3urTGADGc3AH56tmCiVpY
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6632da4 to9855c4cCompareReplace 36+ individual Dockerfiles with a template-based system usingPython, Jinja2, and YAML configuration. All variants now use mlocati'sinstall-php-extensions for consistent dependency management.Architecture:- YAML configuration (templates/config.yaml) - Single source of truth- Configuration validation (templates/validate_config.py) - Schema validation- Jinja2 templates (4 files) - Base, Symfony, CI, FrankenPHP variants- Generation script (templates/generate.py) - Automates creationKey improvements:- Use install-php-extensions (mlocati) for all PHP extension installations- Automatic dependency handling across all PHP versions- No manual --with-libzip or PHPIZE_DEPS configuration needed- Support for legacy packages (iputils-ping, libicu-dev for PHP 5.6-7.3)- Debian Stretch repository updates for PHP 7.1-7.3Benefits:- 4 templates instead of 36+ Dockerfiles- YAML configuration with validation- Guaranteed consistency across all images- Simplified extension management with mlocati- Easy to add new PHP versions or variantsBug fixes:- FrankenPHP Bookworm now uses apt-get instead of apk- Debian Stretch repository updates for archived versionsUsage: make validate # Validate configuration make generate # Generate all Dockerfiles make build # Build all images
9855c4c to4056349CompareSign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a template-based architecture that significantly reduces code duplication and improves maintainability across all PHP variants.
What Changed
New Template System
Dockerfile Templates
Build System Updates
Documentation
Benefits
Technical Details
All existing Dockerfiles remain functionally identical.