Docker image for Magento 1.9
Magento version: 220.127.116.11
Built on alexcheng's image, added sendmail support.
For development, fun and test purpose only, it lacks essential support for production deployment.
(The true story is that a friend of mine asked for a hand out with some magento crappy things, and I was curious to try out docker.)
Dockerfilewhich output image is pushed to
sekmo/magentoon dockerhub (it runs supervisor to start apache and sendmail on the same container)
htdocsfolder (stuffed with Magento files) and a (empty)
mysqlfolder for persistence
docker-compose.ymlconf file that runs the images
host-set.shscript which is run by supervisor (it just sets the /etc/hosts file on the magento container to run sendmail)
envfile which contains some environments variable (mysql user and password)
usr_local_etc_phpdirectory with a working
How to use
Clone the repo, cd to the directory and run
docker-compose to start the apache and mysql containers in one shot
docker-compose up -d
Stop the containers with
While volume containers should be used for persistence, I preferred to keep things easy and just link the htdocs and mysql folder to the docker host.
I exposed the 3306 port of the mysql container just because it's handy using something like Sequel Pro to connect to the container.
(it's not required by the magento container since it's linked through the docker internal network)