Skip to content

pnlinh/docker-magento

Repository files navigation

Docker PHP-FPM & Nginx base on Alpine Linux

Lightweight docker image for Magento development

Why should use this image

  • Built on the lightweight and secure Alpine Linux distribution
  • Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64
  • Use runit instead of supervisor
  • Tiny Docker image size

PHP versions supported

  • PHP 7.4
  • PHP 8.0
  • PHP 8.1 (recommend usage)
  • PHP 8.2 (recommend usage)

How to use

  • Build image
./build php7.4 # Build image with php 7.4
./build php8.0 # Build image with php 8.0
./build php8.1 # Build image with php 8.1
./build php8.2 # Build image with php 8.2
  • Mount your code to be served with container
docker run --name=app -v /path/to/project:/var/www/html -p 80:80 pnlinh/magento:php7.4
docker run --name=app -v /path/to/project:/var/www/html -p 80:80 pnlinh/magento:php8.0
docker run --name=app -v /path/to/project:/var/www/html -p 80:80 pnlinh/magento:php8.1
  • With docker-compose
services:
  app:
    image: pnlinh/magento:php8.1
    hostname: magento-app
    container_name: magento-app
    ports:
      - "80:80"
    volumes:
      - .:/var/www/html
    networks:
      - localnet
  • See PHP version info
docker run --name=app --rm -p 80:80 pnlinh/magento:php7.4
docker run --name=app --rm -p 80:80 pnlinh/magento:php8.0
docker run --name=app --rm -p 80:80 pnlinh/magento:php8.1

image

References

About

Lightweight docker image for Magento development

Resources

Stars

Watchers

Forks

Packages

No packages published