This repository allows the creation of a Docker environment that meets Magento 1 requirements.
mongo
: This container uses the mongo:latest image.percona
: This container uses the percona:5.6 image.redis
: This container uses the redis:latest image.varnish
: This container uses a custom 3.0.5 version.web
: This container uses a custom PHP 5.6 version.
Since this environment is designed for a local usage, it comes with features helping the development workflow.
The web
container has a mount point used to share source files.
By default, the ~/www/
directory is mounted from the host. It's possible to change this path by editing the docker-compose.yml
file.
It's also possible to create multiple virtual hosts when the container is starting.
All ./docker/web/*.dev
files will be sent to the Zend Server API. Only two things to keep in mind:
- the filename must be the exact domain you want to create and the top-level domain must be
.dev
. - the content must be the exact format used by Zend Server.
The ./docker/percona/
directory is mounted as /etc/mysql/conf.d/
, thus it's possible to modify the MySQL configuration from your host.
By creating a custom.cnf
file for instance and by restarting the MySQL container when a change is made.
This process assumes that Docker Engine and Docker Compose are installed. Otherwise, you should have a look to Install Docker Engine before proceeding further.
$ git clone [email protected]:ajardin/docker-magento.git magento1
It's also possible to download it as a ZIP archive.
$ cp docker-env.dist docker-env
$ nano docker-env
$ docker-compose up -d
$ docker-compose ps
Name Command State Ports
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
magento1_mongo_1 /entrypoint.sh mongod Up 0.0.0.0:27017->27017/tcp
magento1_percona_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
magento1_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
magento1_varnish_1 varnishd -a :8080 -T :6082 ... Up 0.0.0.0:6082->6082/tcp, 0.0.0.0:80->8080/tcp
magento1_web_1 /usr/local/docker/run.sh Up 0.0.0.0:10081->10081/tcp, 0.0.0.0:10082->10082/tcp, 0.0.0.0:10083->10083/tcp, 443/tcp, 0.0.0.0:8080->80/tcp
Note: You will see something slightly different if you do not clone the repository in a magento1
directory.
The container prefix depends on your directory name.