Based on the tutum/lamp docker image, with prestashop-specific additions. The image has Mysql, Apache and PHP installed with all modules and configuration required by Prestashop. The only site enabled in Apache is the Prestashop installation.
Dockerfile and other files can be found at the github repo: amatriain/docker-prestashop.
Docker image can be found at the docker-hub repo: amatriain/prestashop. This is not an automated docker-hub build, because automated builds are always tagged as "latest"; this would keep this image from being tagged with the prestashop version.
Tagging both in Github and Docker-hub follows the Prestashop version: i.e. version 22.214.171.124 of this image contains Prestashop 126.96.36.199
See Docker docs about running a container from an image.
After starting the container, access port 80 with a browser to run the Prestashop installation wizard.
A database named prestashop is already created. There are three database users:
- root: can only login from localhost, no password necessary
- admin: can login from any host, default password admin. A different password can be specified by setting the MYSQL_ADMIN_PASS env variable to the first run of the container, or it can be changed afterwards with a mysql client
- prestashop: can login from any host, default password prestashop. It only has access to the "prestashop" database. A different password can be specified by setting the MYSQL_PRESTASHOP_PASS env variable to the first run of the container, or it can be changed afterwards with a mysql client
Be aware that the default database passwords should be changed if you use this image in production.
80 (http), 3306 (mysql). HTTPS is not enabled in this image.
- mysql configuration: /etc/mysql
- mysql data: /var/lib/mysql
- apache logs: /var/log/apache2
- prestashop installation: /var/www/html
INSPECTING AND EDITING A RUNNING CONTAINER LOGS AND PRESTASHOP FILES
You can create a data volume container from this image, and afterwards start a container for the Prestashop app with the --volumes-from option so that volumes are shared (the data volume container can be stopped, it is only required that it exists). This way an interactive container can be started with the --volumes-from option and /bin/bash as a command to examine the logs, php files etc of the running Prestashop app.