Refactored to copy the entire project directory in composer-deps and assets stages instead of cherry-picking specific files. This:
- Eliminates the separate translations stage
- Avoids missing file issues
- Simplifies the build process
- Maintains performance benefit of building assets once on native platform
Both stages now use COPY . . to get all project files, avoiding the complexity of tracking which files are needed.
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
Symfony console requires .env file to bootstrap. Added COPY .env to translations stage so cache:warmup can run successfully.
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
- Add multi-stage build with separate composer-deps and assets stages
- Assets are built once on native platform (node:22-bookworm-slim)
- Pre-built assets copied into final images for all platforms
- Remove Node.js/Yarn installation from final images (smaller size)
- Use --ignore-platform-reqs for composer in assets stage
- Applies to both Dockerfile and Dockerfile-frankenphp
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
* reorder nodejs/yarn install, separate packages per line
* reduce run actions and reorganize commands
* simplify file creation, copy in one layer only
* fix lint LegacyKeyValueFormat
* arg php_version to run different version
* reorder copy from generated config
* update dockerfile-frankenphp