Since the Docker engine is getting better the performance losses especially on MACs are not as big as they used to be when using bind-mounting in projects such as Symfony or Shopware.
Some of you know, that we like the SFTP way, as it's the best controllable and platform independent way to handle the project and file permissions.
But we get often asked on how to work with dockware and bind-mounting, which is indeed possible.
Let's get started with our bind-mount setup.
An easy starting point for that is to use our "dev" example on Github. https://github.com/dockware/examples/tree/master/bind-mount
Create a folder like
src on your host (maybe in the same directory as your docker-compose...)
This steps only required if you want to use the shopware version provided by your dockware:dev container. Not If you want to use your own project/installation.
Make sure your host
src directory is empty
Make sure the
volumes are commented out in the
Start the container with
docker-compose up -d
Initially copy the dockware files to your host with:
docker cp shop:/var/www/html/. ./src
Move the content around (
cd src && mv html/* . && mv html/.env . && rmdir html && cd .. )
Now you have to modify your
docker-compose.yml and enable the bind-mounting.
You can find a full docker-compose example here https://github.com/dockware/examples/tree/master/bind-mount
Now restart your container and bind-mounting including all your Shopware files is ready to use. You can now change files on your host, and it will be immediately shown without uploading it using SFTP