This repository is educational / sample to provide some bootstrapping code to create Docker containers for y/our projects.
What does Docker provide? Docker is a superlight "virtualization" that makes you insulated environments for - let's say webservers, php, redis, solr, mysql - everything. This and the ability to configure it allows you and other developers to instantly setup development environment without compromising anything on your host machine.
Why this and not Vagrant? The pros:
- Vagrant is full fledged VM, this is not
- Vagrant needs heavy provisioning, this does not
- Docker has built in scaling (one command and you have any number of servers)
- Docker is supported on major hosting and CI platforms
- it works on very small footprint
- Docker
- Docker compose in case it's not installed together
The main configuration that describes the used images and their configuration.
The detailed sub-config for the php image.
Folder to provide project related configurations.
Folder to host the database data in order to persist it.
Project source to work with.
Useful scripts to help work. As an example a drush command to do operations inside the running web server instance.
Depending on your system config you might need sudo
.
Building the instances from the images:
docker-compose build
Starting the instances:
docker-compose up
Stopping it:
docker-compose kill
To access the site, open: http://localhost:8888
This structure and the details are all demonstrational. If you have general improvements, please send a pull request.