We are using the image here: https://hub.docker.com/r/prestashop/prestashop/
How to get up and running:
- Install Docker https://docs.docker.com/desktop/install/windows-install/
- Docker asks to upgrade WSL (Linux subsystem for Windows) https://learn.microsoft.com/fr-fr/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
- Restart computer
- Create a network
docker network create prestashop-net
Create the containers for Prestashop 8.0
docker network create prestashop-net
docker run -ti --name ps8-mysql --network prestashop-net -e MYSQL_ROOT_PASSWORD=admin -p 3307:3306 -d mysql:5.7
docker run -ti --name ps8-prestashop --network prestashop-net -e DB_SERVER=ps8-mysql -p 8080:80 -d prestashop/prestashop
docker run --network prestashop-net --name phpmyadmin -d -e MYSQL_ROOT_PASSWORD=admin --link ps8-mysql:db -p 8081:80 phpmyadmin
For Prestashop 1.7
docker network create prestashop-17
docker run -ti --name ps17-mysql --network prestashop-17 -e MYSQL_ROOT_PASSWORD=admin -p 3308:3306 -d mysql:5.7
docker run -ti --name ps17-prestashop --network prestashop-17 -e DB_SERVER=ps17-mysql -p 8017:80 -d prestashop/prestashop:1.7
docker run --network prestashop-17 --name phpmyadmin-17 -d -e MYSQL_ROOT_PASSWORD=admin --link ps17-mysql:db -p 8018:80 phpmyadmin
Once the containers in place, navigate to localhost:8080 and localhost:8017 to install PrestaShop.
- Name the shop
Prestashop default - Choose
Switzerlandas country to get French and German as language 1 and 2. - On the database configuration page enter
ps8-mysqlorps17-mysqlas hostname andadminas root password, then create the databaseprestashop.
Then, in the Docker UI, on the line of the PrestaShop installation, click on Three dots - Open in terminal, then rename
install and admin folder (mv install install-dev, mv admin admin-dev).
-
Add the English language (Required only for PS 1.7.8, in PS 8.0, it is already installed when selecting
Switzerlandduring installation).- Add English (US) as a new language: In International - Translation under Add / Update a language select English.
- In your profile, select English as your language
-
In Shop parameters - General set
Enable Multistoreto Yes -
Goto Advanced Parameters - Multistore
-
Create shop 2 with name
Shop Aand URLlocalhost:8017/shop-a(Virtual URL =shop-a) -
Create shop 3 with name
Shop Band URLlocalhost:8017/shop-b(Virtual URL =shop-b)
We now have three shops: Prestashop default, Shop A and Shop B