Let's assume you work in a Shopware agency. Then you certainly have various Shopware versions installed and know your way around them perfectly. But wouldn't it be great if you also had the latest versions of the competing store systems installed? With Docker, this can be done within minutes and can thus be made available to everyone. This way, developers can take a closer look at how competitors solve technical problems, but also the sales and marketing team can quickly see what differentiates the tools and how to use this for acquisition.
The only thing needed is Docker and the appropriate container. Since there are already many good guides on how to install the software, we just want to [refer] to it here(https://docs.docker.com/get-docker/).
It's nice that you are reading our magazine. But what would be even nicer is if you tried our service. koality.io offers extensive Website monitoring especially for web projects. Uptime, performance, SEO, security, content and tech.I would like to try koality.io for free
After Docker is running, you should choose the right container. We have had good experience with Alex Cheng's configuration. The installation is done in two steps.
The first thing to do is to install the Git repository:
$ git clone firstname.lastname@example.org:alexcheng1982/docker-magento2.git
After that, the container can already be started.
$ cd docker-magento $ docker-compose up -d
The default installation tries to use port 80. Since this port is usually already in use, at least for developers, we recommend changing this.
This is easily done by modifying the
docker-compose.yml. In the example we have chosen port 8085.
web: image: alexcheng/magento2 ports: - "8085:80"
As of now, you can access Magento2 at
http://localhost:8085 and complete the installation.
During the installation the access data of the database are requested. These are located in the
env file in the root directory. If you leave them in the default they are:
Database Server Host: db Database Server Username: magento Database Server Password: magento Database Name: magento
After that the installation should continue automatically and Magento should be installed.
Encore: Install demo data (technical).
Magento offers demo data that you can simply install into the store and thus have an already filled product inventory. If you just want to try out the system try out the system, you should install this feature at the same time. For this you need a Magento account and the corresponding API key. A Instructions for this is provided by Magento.
First you have to log in to the Docker container. This can be done via:
docker exec -it docker-magento2_web_1 /bin/bash
Then execute the following command in the container and enter the API Key.
php bin/magento sampledata:deploy
Already we have a shop with data.