This project is based on ajardin repository
web
: PHP 7.2 version with Apache (web server).mysql
: mysql:latest image (database).maildev
: djfarrelly/maildev:latest image (emails debugging).
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 add custom virtual hosts: all ./web/vhosts/*.conf
files are copied in the Apache directory during the image build process.
And the ./web/custom.ini
file is used to customize the PHP configuration during the image build process.
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 git@github.com:hochgenug/docker-vns.git vns
$ cp docker-env.dist docker-env
$ nano docker-env
$ docker-compose build
$ docker-compose up -d
$ docker-compose ps
Name Command State Ports
--------------------------------------------------------------------------------------------------------
vns_web_1 docker-custom-entrypoint a ... Up 80/tcp
vns_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
vns_maildev_1 bin/maildev --web 80 --smtp 25 Up 25/tcp, 0.0.0.0:1080->80/tcp
Note: You will see something slightly different if you do not clone the repository in a vns
directory.
The container prefix depends on your directory name.
$ docker exec -it vns_web_1 bash
(To get the name use the docker-compose ps
command)