This repository creates a Docker image for Magento (as of this writing version 1.9.2.2). It is not meant for production but for easy development.
It is based on alexcheng1982/docker-magento. The main difference is that it uses a volume for hosting magento, making it posible to edit the source outside the container.
This image is intented to be used with docker-compose. A sample configuration file ([docker-compose.yml]) is included in this repository. This file references env for it's environment.
Steps:
Download or create docker-compose.yml and env in a folder
Execute docker-compose up -d this starts the MySQL, Redis en PHP/Apache box
Execute docker exec -it -u www-data $(docker-compose ps | grep web | awk '{print $1;}') download-magento to download Magento
(Optional) Execute docker exec -it -u www-data $(docker-compose ps | grep web | awk '{print $1;}') install-sampledata to install the sample data. This has to be done before the Magento installation
Execute docker exec -it -u www-data $(docker-compose ps | grep web | awk '{print $1;}') install-magento to run the magento installer.
exec-magerun.sh and exec-php-cli.sh allow running n98-magerun and PHP inside the docker container,
the local directory inside the container is /var/www/htdocsdocker exec -it $(docker-compose ps | grep web | awk '{print $1;}') usermod -u $(id -u USERNAME) www-data where
USERNAME is replaced by the user you want www-data to correspond with.Content type
Image
Digest
Size
240.7 MB
Last updated
over 10 years ago
docker pull elzekool/magdev