Docker

Docker is not the recommended way to install Shopware 6 on a Mac when it comes to the default way, due to performance issues. You still can have a look at the following possibilities though.

When it comes to using Windows, it's recommended to use Dockware or other ways to install Shopware. See "next steps" paragraph for further reference.

Default way

At least on Linux operating systems, docker installation is the easiest way to get a running Shopware 6. This way you can set up Shopware 6 with just three easy commands:

  1. Build and start the containers:

> ./psh.phar docker:start
  1. Access the application container:

> ./psh.phar docker:ssh
  1. Execute the installer inside the docker container:

> ./psh.phar install

This may take a while since many caches need to be generated on first execution, but only on first execution.

To be sure the installation succeeded, just open the following url in your favorite browser: http://localhost:8000/

After exploring Shopware 6 you can terminate it with these two commands:

  1. Leave the shell:

> exit
  1. Stop the containers:

> ./psh.phar docker:stop

Possibilities to use Docker on Mac

Using native mounting with Docker Volumes and docker-sync

If you are working with Mac/OSX and are facing performance issues, you should use docker-sync instead of the default mounting strategy.

Preparation

Download & install docker-sync from http://docker-sync.io/, which supports OSX, Windows, Linux and FreeBSD. docker-sync uses Ruby, which is pre-installed on OSX. On other operating systems, you might have to install Ruby separately.

  • For OSX, see OSX.

  • For Windows, see Windows.

  • For Linux, see Linux.

  • See the list of alternatives here

Enable the use of docker-sync in PSH Console

By default, the usage of docker-sync is disabled in PSH. To use Docker Volumes with Docker Sync, you must set DOCKER_SYNC_ENABLED to true in your .psh.yaml.override. Create a new entry in the const section like so:

const:
#..
DOCKER_SYNC_ENABLED: true

That's it. Continue to install Shopware 6 as usual:

  1. Build and start the containers:

> ./psh.phar docker:start

This command creates and starts the containers, watchers, and the sync itself. Running start the first time takes several minutes to complete. Subsequent starts are a lot faster since the images and volumes are reused.

  1. Access the application container:

> ./psh.phar docker:ssh
  1. Execute the installer inside the Docker container:

> ./psh.phar install

For more information about Shopware Installation, take a look at the Installation overview.

Next steps

As next step, you might want to start writing your very own plugin. Head over to Plugin base guide to learn about that topic. Would you like to explore alternative ways to install Shopware? You can install Shopware on Mac with the help of other tools: