• Stars
    star
    242
  • Rank 161,094 (Top 4 %)
  • Language
    Dockerfile
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐳

PrestaShop on Docker

Tests Codestyle

Supported tags

Images by PrestaShop version

  • 8, latest, 8-apache
  • 8-fpm
  • nightly (Latest but unstable release from git)

You can use tags for this. For example:

$ docker run -ti --name my-docker-name -e PS_DEV_MODE=false -e PS_INSTALL_AUTO=0 -p 8080:80 -d prestashop/prestashop:8.0

What is PrestaShop

PrestaShop is a free and open-source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc. See all the available features.

www.prestashop-project.org

PrestaShop's back office dashboard

How to run these images

These images are running with the latest version in the official PHP repository. For the database, you can use and link any SQL server related to MySQL.

Currently if you do not have any MySQL server, the most simple way to run this container is:

# create a network for containers to communicate
$ docker network create prestashop-net
# launch mysql 5.7 container
$ docker run -ti --name some-mysql --network prestashop-net -e MYSQL_ROOT_PASSWORD=admin -p 3307:3306 -d mysql:5.7
# launch prestashop container
$ docker run -ti --name some-prestashop --network prestashop-net -e DB_SERVER=some-mysql -p 8080:80 -d prestashop/prestashop:latest

A new shop will be built, ready to be installed.

You can then use the shop by reaching http://localhost:8080.

The MySQL server can be reached:

  • from the host using port 3307 (example: $ mysql -uroot -padmin -h localhost --port 3307)
  • from a container in the network using the URL some-mysql.

For example, when you reach the "database configuration" install step, the installer will ask for the "server database address": input some-mysql.


However, if you want to customize the container execution, here are many available options:

Environment variable Description Default value
PS_DEV_MODE The constant PS_MODE_DEV will be set at true 0
PS_HOST_MODE The constant PS_HOST_MODE will be set at true. Useful to simulate a PrestaShop Cloud environment. 0
PS_DEMO_MODE The constant PS_DEMO_MODE will be set at true. Use it to create a demonstration shop. 0
DB_SERVER If set, the external MySQL database will be used instead of the volatile internal one localhost
DB_USER Override default MySQL user root
DB_PASSWD Override default MySQL password admin
DB_PREFIX Override default tables prefix ps_
DB_NAME Override default database name prestashop
PS_INSTALL_AUTO The installation will be executed. Useful to initialize your image faster. In some configurations, you may need to set PS_DOMAIN or PS_HANDLE_DYNAMIC_DOMAIN as well. (Please note that PrestaShop can be installed automatically from PS 1.5) 0
PS_ERASE_DB Drop the mysql database. All previous mysql data will be lost 0
PS_INSTALL_DB Create the mysql database. 0
PS_DOMAIN When installing automatically your shop, you can tell the shop how it will be reached. For advanced users only
PS_LANGUAGE Change the default language installed with PrestaShop en
PS_COUNTRY Change the default country installed with PrestaShop GB
PS_ALL_LANGUAGES Install all the existing languages for the current version. 0
PS_FOLDER_ADMIN Change the name of the admin folder admin
PS_FOLDER_INSTALL Change the name of the install folder install
PS_ENABLE_SSL Enable SSL at PrestaShop installation. 0
ADMIN_MAIL Override default admin email [email protected]
ADMIN_PASSWD Override default admin password prestashop_demo

If your IP / port (or domain) change between two executions of your container, you will need to modify this option:

Environment variable Description Default value
PS_HANDLE_DYNAMIC_DOMAIN Add specific configuration to handle dynamic domain 0

Documentation

The user documentation (in English by default) is available here.

The developer documentation (English only) can be found here.

Troubleshooting

Prestashop cannot be reached from the host browser

When using Docker for Mac or Docker for Windows (throught WSL), Prestashop cannot be reached from the host browser (gets redirected to "dockeripaddress:8080")

Docker for Mac has an issue with bridging networking and consequently cannot reach the container on its internal IP address. After installation, the browser on the host machine will be redirected from http://localhost:8080 to http://<internal_prestashop_container_ip>:8080 which fails.

You need to set the PS_DOMAIN variable to localhost:8080 for it to work correctly when browsing from the host computer. The command looks something like this:

$ docker run -ti --name some-prestashop --network prestashop-net -e DB_SERVER=some-mysql -e PS_DOMAIN=localhost:8080 -p 8080:80 -d prestashop/prestashop

Cannot connect to mysql from host - authentication plugin cannot be loaded

ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: ...

If your mysql image uses MySQL 8, the authentication plugin changed from mysql_native_password to caching_sha2_password. You can bypass this by forcing the old authentication plugin:

$ docker run -ti -p 3307:3306 --network prestashop-net --name some-mysql -e MYSQL_ROOT_PASSWORD=admin -d mysql --default-authentication-plugin=mysql_native_password

Cannot connect to mysql from host - cannot use socket

ERROR 1045 (28000): Access denied for user '...'@'...' (using password: YES)

For some usecases, you might need to force using TCP instead of sockets:

$ mysql -u root -padmin -h localhost --port 3307 --protocol=tcp

During the installation, prestashop cannot connect to mysql - bad charset

Server sent charset (255) unknown to the client. Please, report to the developers

MySQL 8 changed the default charset to utfmb4. But some clients do not know this charset. This requires to modify the mysql configuration file.

If you are using a mysql container, you need to :

  • modify mysql configuration file /etc/mysql/my/cnf and add:
[client]
default-character-set=utf8

[mysql]
default-character-set=utf8


[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8
  • restart mysql container

How to use the builder script

For more information, read HOW-TO-USE.md file

More Repositories

1

PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
PHP
7,445
star
2

prestashop-icon-font

An open source icon pack made with love by the PrestaShop design team. You can use it everywhere to make your designs and websites look awesome.
CSS
313
star
3

PrestaShop-webservice-lib

PHP client for PrestaShop Webservices
PHP
201
star
4

PrestaShop-modules

Partner and native modules
190
star
5

StarterTheme

[DEPRECATED] PrestaShop Starter Theme
Smarty
181
star
6

example-modules

Example PrestaShop modules
Twig
161
star
7

docs

PrestaShop technical documentation
Scala
113
star
8

php-ps-info

Simple script that allows you to test if your current environment fulfills PrestaShop's system requirements, and offers suggestions for improvements.
PHP
101
star
9

autoupgrade

Upgrade module for PrestaShop
PHP
95
star
10

hummingbird

Smarty
77
star
11

community-theme-16

Basic PrestaShop 1.6 Bootstrap theme which focuses on extendability. This theme is maintained by PrestaShop community, not by PrestaShop SA.
Smarty
66
star
12

gsitemap

This module generates your Google sitemap file
PHP
58
star
13

ps_facetedsearch

PrestaShop module that adds layered navigation filters.
PHP
53
star
14

paymentexample

Payment module example that you can use as a guide to start your own.
PHP
52
star
15

prestashop-ui-kit

UI kit for PrestaShop Backoffice - A collection of styled components, based on Bootstrap 4
HTML
45
star
16

ps_emailalerts

Sends e-mail notifications to customers and merchants regarding stock and order modifications.
PHP
42
star
17

prestashop.github.io

PrestaShop Build: Official blog for PrestaShop development straight from the product and core dev team.
SCSS
41
star
18

ps_googleanalytics

Gain clear insights into important metrics about your customers, using Google Analytics.
PHP
40
star
19

blockwishlist

Adds a block containing the customer's wishlists.
PHP
39
star
20

PrestaShop-1.4

Open-source e-commerce solution version 1.4
PHP
39
star
21

classic-theme

Default theme for PrestaShop 1.7 and 8+
Smarty
38
star
22

pscleaner

This module allows you to check and fix functional integrity constraints and remove default data
PHP
34
star
23

PrestaShop-1.6

Open-source e-commerce solution version 1.6
PHP
33
star
24

php-dev-tools

PHP Coding Standards for PrestaShop projects
PHP
33
star
25

prestashop-specs

Project specifications for PrestaShop's Core features and native modules
HTML
31
star
26

open-source

Sources for www.prestashop-project.org
Shell
31
star
27

productcomments

PrestaShop module that allows users to post reviews and rate products.
PHP
30
star
28

psgdpr

Official GDPR compliance module
JavaScript
28
star
29

circuit-breaker

A resilient PHP library that allows to safely make calls to external services
PHP
27
star
30

prestashop-shop-creator

Generate random demo data to test your PrestaShop shop.
PHP
24
star
31

mailalerts

Sends e-mail notifications to customers and merchants in PrestaShop 1.6.
PHP
22
star
32

PrestaShop-1.5

Open-source e-commerce solution version 1.5
PHP
22
star
33

prestonbot

Preston, the PrestaShop contributor's best friend! ✨
PHP
21
star
34

prestashop-flashlight

A docker based testing utility for PrestaShop
Shell
20
star
35

PrestaShop-norm-validator

PHP
20
star
36

TranslationFiles

[READ-ONLY] This repository contains all the necessary files to generate translation packs for PrestaShop 1.6, 1.7 and higher. It's updated automatically.
20
star
37

blockreassurance

Adds an information block aimed at offering helpful information to reassure customers that your store is trustworthy.
PHP
18
star
38

PrestaShopAutomationFramework

Framework for writing automated tests for PrestaShop
PHP
18
star
39

decimal

An object-oriented implementation of basic math operation with arbitrary precision, using BC Math if available.
PHP
17
star
40

standard_coding_hook

Git hooks that verifies if your commit message respects the norm
PHP
14
star
41

ps_qualityassurance

Magic module to test module integration in PrestaShop
Vue
13
star
42

watermark

Protect image by watermark.
PHP
13
star
43

ps_cashondelivery

Accept cash on delivery payments
PHP
13
star
44

ps_linklist

Adds a block with several links.
PHP
13
star
45

performance-project

Tools to benchmark PrestaShop.
Scala
12
star
46

referralprogram

Integrate a referral program system into your shop.
PHP
12
star
47

ps_crossselling

Adds a "Customers who bought this product also bought..." section to every product page.
PHP
11
star
48

prestafony-project

Some resources to help you migrate PrestaShop to Symfony 3
PHP
11
star
49

ADR

Architecture Decision Records for the PrestaShop project
11
star
50

ps_wirepayment

PrestaShop module that allows to accept payments for your products via bank wire transfer.
PHP
11
star
51

PrestaShop-backward_compatibility

Backward compatibility module for PrestaShop
PHP
10
star
52

ganalytics

Gain clear insights into important metrics about your customers, using Google Analytics in PrestaShop 1.6.
PHP
10
star
53

loyalty

Provide a loyalty program to your customers.
PHP
10
star
54

ps_imageslider

Adds an image slider to your PrestaShop homepage.
PHP
10
star
55

contactform

Adds a contact form to the "Contact us" page
PHP
10
star
56

bankwire

Accept payments for your products via bank wire transfer in PrestaShop 1.6.
PHP
10
star
57

docker-internal-images

Docker images with PrestaShop pre-installed and MySQL included
Shell
10
star
58

ps_shoppingcart

Adds a block containing the customer's shopping cart.
PHP
9
star
59

zip-archives

This repository hosts PrestaShop ZIP published archives.
9
star
60

docker-templates

Docker & docker-compose templates
Dockerfile
9
star
61

mjml-theme-converter

Tool used to convert a PrestaShop mail theme from MJML to twig
Twig
9
star
62

traces

Micro CLI application to get all GitHub contributors for a specified repository
PHP
7
star
63

ps_categoryproducts

Adds a block on the product page that displays products from the same category.
PHP
7
star
64

ps_themecusto

This module guides the merchant on customizing the look of their shop
PHP
7
star
65

ps_emailsubscription

Adds a block for newsletter subscription.
PHP
7
star
66

cashondelivery

Accept cash on delivery payments in PrestaShop 1.6.
PHP
7
star
67

ps_sharebuttons

Displays social media sharing buttons (Twitter, Facebook, Google+ and Pinterest) on every product page.
PHP
7
star
68

favoriteproducts

Display a page featuring the customer's favorite products.
PHP
7
star
69

ps_mainmenu

Adds a new horizontal menu to the top of your PrestaShop
PHP
7
star
70

ps_reminder

Follow-up with your customers by sending abandonment cart emails and other reminders.
PHP
7
star
71

ps_socialfollow

Allows you to add information about your brand's social networking accounts.
PHP
7
star
72

docker-ci

Contains the latest version of a Git branch from the PrestaShop repository. Useful to get at all time the latest changes or to test a specific pull-request.
Dockerfile
7
star
73

ps_searchbar

Adds a quick search field to your PrestaShop.
PHP
7
star
74

example_module_mailtheme

Example module to add a Mail theme to PrestaShop.
Twig
6
star
75

webservice-postman-examples

This repository contains example API requests and configuration for Postman API Platform
6
star
76

welcome

This module helps merchants create their first product and discover their new shop's main features.
PHP
6
star
77

childtheme-example

PrestaShop introduces a Parent/child theme feature. This is a very basic child theme, that modifies some small details in Classic
Smarty
6
star
78

ps_buybuttonlite

Create a product checkout redirect link to post on a blog or any social media
PHP
6
star
79

statsdata

Data mining for statistics
PHP
6
star
80

blocklayered

[DEPRECATED] Layered navigation block for PrestaShop 1.6
PHP
6
star
81

issuebot

A bot for automating issue status
JavaScript
6
star
82

firebaseauthenticator

Handle login on the PrestaShop back-office with Firebase.
PHP
6
star
83

vatnumber

Enables you to enter the intra-community VAT number when creating the address.
PHP
6
star
84

gapi

Google Analytics API
PHP
5
star
85

ps_categorytree

PrestaShop module that adds a block featuring product categories.
PHP
5
star
86

socialsharing

Displays social sharing buttons (Twitter, Facebook, Google+ and Pinterest) on every product page in PrestaShop 1.6.
PHP
5
star
87

dashproducts

Adds a block with a table of your latest orders and a ranking of your products.
PHP
5
star
88

phpstan-prestashop

PHPStan extension for PrestaShop
PHP
5
star
89

pagesnotfound

Adds a tab to the Stats dashboard, showing the pages requested by your visitors that have not been found.
PHP
5
star
90

ps_featuredproducts

Displays featured products in the central column of your homepage.
PHP
5
star
91

PSFunctionalTests

Functional testing scenarios
JavaScript
5
star
92

advancedeucompliance

This module helps merchants in getting compliant with applicable e-commerce law in PrestaShop 1.6.
PHP
5
star
93

presthubot

PrestaShop maintainer's best friend
PHP
5
star
94

ps_checkpayment

PrestaShop module that allows you to accept payments by check.
PHP
5
star
95

translationsenglish

Search all translation which are english and change key in all files
PHP
5
star
96

ps_customtext

Adds custom text in your store.
PHP
4
star
97

ps_distributionapiclient

Allows to install & update native modules from the Back office
PHP
4
star
98

TranslationToolsBundle

Parse and manage your translations with ease
PHP
4
star
99

ps_specials

Displays your products that are currently on sale in a dedicated block.
PHP
4
star
100

ps_contactinfo

Allows you to display additional information about your store's customer service.
PHP
4
star