symfony-docker
symfony-docker copied to clipboard
Build arguments for `php` missing when building `caddy` image
Passing a custom SYMFONY_VERSION when building the project with SYMFONY_VERSION=5.2.* docker-compose build will only be used when building the php image, but not when building caddy (which needs to copy files from the symfony_php) build stage.
This resulted in an error for me because my project needs symfony 5.2, so the php image built correctly, while the caddy image resulted in an error during a composer post-install script.
I fixed this by adding
args:
SYMFONY_VERSION: ${SYMFONY_VERSION:-}
to the caddy service config in docker-compose.yml, but this might be needed for any custom build args passed to php.