Public Repository

Last pushed: 3 months ago
Short Description
A Docker image for running Magento (or any PHP sites) with Xdebug and OPCache included.
Full Description

Dockerfile

The image is based on Alpine and it's just ~21MB!

Usage

This must be used with an Nginx container. A sample docker-compose.yml:

web:
  image: hansphung/dockerized-magento-nginx:stable-alpine
  ports:
    - "80:80"
    - "443:443"
  links:
    - "php"
  volumes:
    - ./var/log/nginx:/var/log/nginx
    - ./var/nginx/custom-locations:/etc/nginx/custom-locations
  volumes_from:
    - php
php:
  image: hansphung/dockerized-magento-php:7.0-fpm-alpine
  links:
    - "cache:rediscache"
    - "sessions:redissession"
    - "db:db"
  volumes:
    - .:/var/www/html
  environment:
    XDEBUG_REMOTE_HOST: 192.168.0.102

A full Magento app sample is available here: https://github.com/hanhpv/dockerized-magento

Environment

  • XDEBUG_REMOTE_HOST: the IP of host machine
Docker Pull Command
Owner
hansphung

Comments (0)