dockware
Search…
Create a new Project
This page is for everyone who develops a custom shop as a merchant or as an agency.
At the end of this page, you have a custom Shopware 6 installation, and also the full source code and database backup locally, so you can start developing.

1. Start Container

We first have to decide how we want to get our project source code. We can either use a prepared dockware/dev image with an existing Shopware version and download the source code, or use a dockware/essentials and start right away with mounting.
We usually recommend dockware/essentials or dockware/flex for custom projects.
Let's use dockware/essentials, because we can immediately install everything with our single container, thanks to the built-in MySQL service.
We create a docker-compose, which need anyway sooner or later.
1
shop:
2
image: dockware/essentials:latest
3
container_name: shop
4
ports:
5
- "80:80"
6
- "3306:3306"
Copied!
After the container has been started, we connect into it with our terminal.
1
docker exec -it shop bash
Copied!

2. Install Shopware

The installation of Shopware is very easy. We use the prepared makefile command to download any Shopware version from the Shopware website and prepare it, so it can be easily installed in our browser.
1
cd /var/www
2
make download url=https://www.shopware.com/en/...
Copied!
You can use any Shopware version as URL from this page: https://www.shopware.com/en/changelog/
Just right click on any install/download button and copy the URL.
The makefile will now download the ZIP file and extract into the DocRoot of the dockware container. Now simply open your browser and install your Shopware 6 version.

3. Export Database

After we have initially installed and prepared our shop, let's just export the database, so that we can use it later on.
Connect into your container and run the following command with your database name.
1
mysqldump -u root -proot (dbName) > /var/www/html/database.sql
Copied!
The full database is now exported as a backup file in the Docroot.

4. Download Source Code

Our final step is to download everything to our host machine. We need the source code as well as the database backup.
What you do with those files is totally up to you. One would usually add the source code to a GIT repository and the database to an internal sharing system within your company.
Let's just run these 2 commands on your host machine.
1
mkdir ./src
2
docker cp (containerName):/var/www/html/. ./src
Copied!
Congratulations, you have a fully local source code and database backup for your custom Shopware shop.