Installation Using Docker on Windows 10¶
Expected installation time: less than 1 hour.
This guide covers building new projects based on Shopsys Framework. In case you want to contribute to the framework itself, you need to install the whole shopsys/shopsys monorepo. Take a look at the article about Monorepo for more information.
- Windows 10 version 2004 and higher
- enabled Virtualization in BIOS
Installation of application requirement¶
Setup WSL 2 and download Debian¶
This guide covers installation using
Debian distribution. Rest of guide might not be suitable for you, if you decide to select different distribution.
In Windows Subsystem for Linux Installation Guide for Windows 10 follow steps 1 to 5.
Debian GNU/Linux distribution in step 6.
After installation open
You will be prompted to create new user.
Install Docker Desktop¶
- Download Docker Desktop and install it.
Enable WSL 2 and Debian integration in Docker Desktop¶
- Open settings of Docker Desktop.
- Go to
Expose daemon on tcp://localhost:2375 without TLSoption.
Use the WSL 2 based engineoption.
Apply & Restartbutton.
- Go to
Resourcessection and then to
Enable integration with my default WSL distrooption.
- Also turn on
Enable integration with additional distros.
Apply & Restartbutton.
Install dependencies, Docker and docker-compose in Debian¶
We have prepared installation script for Debian dependencies in order to speed up the installation process.
Debian application run these commands:
sudo apt update
sudo apt install -y --no-install-recommends wget
wget --no-check-certificate https://raw.githubusercontent.com/shopsys/shopsys/master/project-base/scripts/install-docker-wsl-debian.sh
sudo bash install-docker-wsl-debian.sh
* You can delete the downloaded file at the end of installation using
rm install-docker-wsl-debian.sh command.
* To ensure everything is working alright, restart
Docker Desktop and
If you prefer to know more about what is happening during installation, open install-docker-wsl-debian.sh script and run all commands manually.
Installation of Shopsys Framework¶
1. Create new project from Shopsys Framework sources¶
Change your current directory to your home directory (
Install project with composer
composer create-project shopsys/project-base --no-install --keep-vcs --ignore-platform-reqs cd project-base
Now you can access your project files directly from Windows Explorer under this address
--no-installoption disables installation of the vendors - this will be done later in the Docker container
--keep-vcsoption initializes GIT repository in your project folder that is needed for diff commands of the application build and keeps the GIT history of
--ignore-platform-reqsoption ensures your local PHP setup is not verified (it is not needed, everything is installed in Docker later)
Now, you have two options:
In the case you want to start demo of the application as fast as possible, you can simply execute the installation script and that is all:
Linux or Windows with WSL 2 from list of operating systems as you are installing it in
After the script is finished with installing the application, you can skip all the other steps and see the last chapter of Application Setup Guide to get all the important information you might need right after the installation.
If you prefer to know more about what is happening during installation, continue with the steps #2.1 - #2.3.
2.1 Create docker-compose.yml and docker-sync.yml file¶
docker-compose.yml from template
cp docker/conf/docker-compose.yml.dist docker-compose.yml
2.2. Compose Docker container¶
You need to create a directory for persisting vendor, PostgreSQL and Elasticsearch data so you won't lose them when the container is shut down.
mkdir -p vendor var/postgres-data var/elasticsearch-data
Then rebuild and start containers
docker-compose up -d
During installation there will be installed 3-rd party software as dependencies of Shopsys Framework by Dockerfile with licenses that are described in document Open Source License Acknowledgements and Third-Party Copyrights