Sign inSign up

dementev/prestashop-test-images

By dementev

•Updated 8 months ago

All-in-one PrestaShop images with Nginx + PHP-FPM on Alpine for testing and CI/CD

Image
0

1.7K

dementev/prestashop-test-images repository overview

⁠PrestaShop Docker Images

All-in-one PrestaShop Docker images with Nginx + PHP-FPM on Alpine Linux. Each image ships with a specific PrestaShop release baked in and performs auto-installation on first start.

WARNING: These images are intended only for testing and CI/CD pipelines. They are not hardened, optimized, or supported for production use. Do not deploy them in production environments. For production installations, use official PrestaShop releases from prestashop.com⁠.

⁠Available Images

Base image: dementev/php-fpm-with-ext:<php>-fpm

PrestaShopPHP versionsTags
1.7.5.27.0, 7.1, 7.2ps175-php70 ps175-php71 ps175-php72
1.7.6.97.0, 7.1, 7.2ps176-php70 ps176-php71 ps176-php72
1.7.7.87.1, 7.2, 7.3ps177-php71 ps177-php72 ps177-php73
1.7.8.107.1, 7.2, 7.3, 7.4ps178-php71 ps178-php72 ps178-php73 ps178-php74
8.0.58.0, 8.1ps80-php80 ps80-php81
8.1.78.0, 8.1ps81-php80 ps81-php81
8.2.48.0, 8.1, 8.2, 8.3, 8.4ps82-php80 ps82-php81 ps82-php82 ps82-php83 ps82-php84

Architectures: linux/amd64, linux/arm64

⁠Quick Start

docker run -d \
  -p 8080:80 \
  -e PS_DOMAIN=localhost:8080 \
  -e DB_SERVER=host.docker.internal \
  -e DB_NAME=prestashop \
  -e DB_USER=root \
  -e DB_PASSWD=secret \
  -e PS_INSTALL_AUTO=1 \
  -e PS_ERASE_DB=1 \
  -e PS_INSTALL_DB=1 \
  dementev/prestashop-test-images:ps82-php84

⁠Environment Variables

⁠Required for auto-install
VariableDefaultDescription
PS_DOMAINlocalhostStore domain (e.g. shop.localhost, localhost:8080). Falls back to container IP if not set during install.
DB_SERVERlocalhostMySQL hostname
DB_PORT3306MySQL port
DB_NAMEprestashopDatabase name
DB_USERrootDatabase user
DB_PASSWDadminDatabase password
DB_PREFIXps_Table prefix
⁠Installation control
VariableDefaultDescription
PS_INSTALL_AUTO0Set to 1 to run the CLI installer on first boot
PS_ERASE_DB0Set to 1 to drop the database before install
PS_INSTALL_DB0Set to 1 to create the database if it doesn't exist
⁠Admin account
VariableDefaultDescription
ADMIN_MAIL[email protected]Admin email
ADMIN_PASSWDprestashop_demoAdmin password
PS_FOLDER_ADMINadmin-devAdmin folder name (renamed on install)
PS_FOLDER_INSTALLinstallInstall folder name (removed after install)
⁠Localization
VariableDefaultDescription
PS_LANGUAGEenDefault language ISO code
PS_COUNTRYGBDefault country ISO code
PS_ALL_LANGUAGES0Set to 1 to install all available languages
⁠Feature flags
VariableDefaultDescription
PS_DEV_MODE0Enable PrestaShop developer mode
PS_HOST_MODE0Enable host mode
PS_DEMO_MODE0Enable demo mode
PS_ENABLE_SSL0Set to 1 to enable SSL during install

⁠Architecture

Each image bundles:

  • Nginx — serves static files and proxies PHP to FPM via Unix socket
  • PHP-FPM — dynamic process manager (max 20 children)
  • PrestaShop — baked into /var/www/html at build time
⁠Entrypoint flow (docker_run.sh)
  1. Wait for MySQL to become available (if PS_INSTALL_AUTO=1)
  2. Detect if PrestaShop is already installed (checks for settings.inc.php / parameters.php / parameters.yml)
  3. Run pre-install scripts from /tmp/pre-install-scripts/ (if any)
  4. Rename install and admin folders if custom names are set
  5. Optionally drop and/or create the database
  6. Run the PrestaShop CLI installer
  7. Run post-install scripts from /tmp/post-install-scripts/ (if any)
  8. Enable demo mode if requested
  9. Start PHP-FPM, then Nginx in foreground
⁠Custom scripts

Mount executable scripts to run them during setup:

# Before PrestaShop installation
-v ./my-script.sh:/tmp/pre-install-scripts/my-script.sh

# After PrestaShop installation
-v ./my-script.sh:/tmp/post-install-scripts/my-script.sh
⁠PHP configuration
SettingValue
memory_limit1024M
upload_max_filesize20M
post_max_size22M
max_execution_time30s
max_input_vars10000
opcache.memory_consumption256M
opcache.validate_timestampsOff
client_max_body_size (nginx)64M
⁠Health check

Built-in health check via curl http://localhost/ping (interval: 5s, start period: 300s).

⁠Building Locally

docker build \
  --build-arg PS_VERSION=8.2.4 \
  --build-arg PHP_VERSION=8.4 \
  -t prestashop:ps82-php84 .

⁠Docker Compose Example

See docker-compose.test.yml for a full example with Traefik, MySQL, Adminer, Redis, Memcached, and Mailpit.

services:
  prestashop:
    build:
      context: .
      args:
        PS_VERSION: "8.2.4"
        PHP_VERSION: "8.4"
    environment:
      PS_DOMAIN: shop.localhost
      DB_SERVER: mysql
      DB_NAME: prestashop
      DB_USER: root
      DB_PASSWD: secret
      PS_INSTALL_AUTO: 1
      PS_ERASE_DB: 1
      PS_INSTALL_DB: 1
      PS_DEV_MODE: 1
      PS_FOLDER_ADMIN: admin-dev
    ports:
      - "8080:80"
    depends_on:
      mysql:
        condition: service_healthy

  mysql:
    image: mysql:8.0
    command: --disable-log-bin --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: secret
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
      interval: 5s
      timeout: 5s
      retries: 10

Tag summary

Content type

Image

Digest

sha256:6726f57d4…

Size

129.7 MB

Last updated

8 months ago

docker pull dementev/prestashop-test-images:ps178-php72