Closed rasodu closed 8 years ago
Better solution is to use 'PHP_VERSION' variable in the .env file to load different version of dockerfile instead of using additional compose file.
May not need to create separate docker file cmd service. This file may build as is with php5.6 and php7.0
Change current dockerfile name:
Create new dockerfiles:
Create docker-compose-70php.overwrite.yml and docker-compose-php70.prod.yml
New command to run the project.
docker-compose up -d
: start development server with default version of phpdocker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
: start production server with default version of phpdocker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose-php<version>.override.yml up -d
: start development server with chosen version of phpdocker-compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose-php<version>.prod.yml up -d
: start production server with chosen version of php