Switch PHP Version

Every dockware version allows you to switch to any PHP version that is supported by Shopware 6. This is done when starting your container. You can either use a command option when using "docker run", or set the PHP version in your docker-compose.yml file.

Switch with RUN command

docker run --rm -p 80:80 -e PHP_VERSION=7.2 dockware/play:latest

Switch with docker-compose

shopware:
      image: dockware/play:latest
      ...
      environment:
         - PHP_VERSION=7.2

Switch at Runtime

make switch-php version=8.0
make switch-php version=7.4

The command has been designed to be as robust as possible.

This means, that nothing should break if you switch to the same PHP version, or even a version that is not supported and existing in the current image you use.

Last updated