A Docker image for running Magento (or any PHP sites) with Xdebug and OPCache included.
368
7.0-fpm-alpine latest DockerfileThe image is based on Alpine and it's just ~21MB!
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
XDEBUG_REMOTE_HOST: the IP of host machineContent type
Image
Digest
Size
19.9 MB
Last updated
over 9 years ago
docker pull hansphung/dockerized-magento-php