dockware
  • dockware doc's
  • News
  • Setup
    • Docker Setup
    • What Image should you use?
    • Performance Tweaks
  • Use Dockware
    • First Run
    • Update Dockware
    • Advanced Run
    • Default Credentials
    • Symfony or Shopware 5
    • Changelog
  • Features
    • Intro
    • Environment Variables
    • Adminer
    • Mailcatcher
    • Switch PHP Version
    • Switch Node Version
    • Tideways Profiling
    • Pimp my Log
    • Filebeat
    • SSH Users
    • MySQL Users
    • Shopware Currency
  • Development
    • Intro
    • Start Developing
    • Switch Branches
    • Debugging
    • Watchers
    • App Development
    • Update Shopware
    • Dockware Essentials
    • Custom Domains
    • Custom Images
    • Code Coverage
    • CLI Build Shopware 6 Plugin
    • Multi-Environment Setups
  • Contribute
    • Intro
    • Setup Github Version
    • Create Feature
    • Code Styles
    • Testing
    • Create Pull Requests
  • CI/CD
    • Github
    • Gitlab
    • Bitbucket
    • Buddy
  • Tips & Tricks
    • Create a new Project
    • Bind-Mounting
    • Persisting Data
    • Housekeeping
    • Online Servers
    • Performance on Mac
    • Security
  • FAQ
    • Sequel Pro
    • Dockware and other images
    • Scripts (PSH?)
    • Redis
    • Error Port not available
    • MySQL failed
    • Elasticsearch
    • Windows Problems
    • Chrome Problems
    • Import MySQL Dump
    • Shopware 5 Support
    • Use Https/SSL
    • Container hangs in Pipeline
    • Disable the admin worker
  • Additional Links
    • Imprint
    • Founders
    • Dockware website
    • Dockware in Shopware Slack
Powered by GitBook
On this page
  • Switch with RUN command
  • Switch with docker-compose
  • Switch at Runtime

Was this helpful?

  1. Features

Switch PHP Version

PreviousMailcatcherNextSwitch Node Version

Last updated 3 years ago

Was this helpful?

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.

Watch our video about switching while using "docker run"
Watch our video about switching with your docker-compose.yml