Here at Palm, we love Docker. Docker allows us to deploy apps quickly and easily across a cluster of our cloud servers. Here's a little tutorial explaining how we dockerize our hosting environment.
A checklist of what we gonna do:
Some say that the idea of Docker is to run a single process in a container such that we need 3 containers in this case. Well, I am going to say that's absolutely not true. Docker runs fine with multiple processes in a container and the core idea of Docker should be running a single service in a container. In our case, that's our hosting service, so we are going to build one single container only.
Building the container is easy, for those of you who don't know what Dockerfile is, please refer to Dockerfile reference.
Here's our Github Repo for our docker image:
playahk/docker-nginx-pagespeed-php
Contribute to docker-nginx-pagespeed-php development by creating an account on GitHub.
To Use it:
Apart from web servers, we use MySQL as our primary database of choice. To save us time, we use the official MySQL docker image from Dockerhub:
In docker series 2, we will introduce the use of docker swarm to manage a cluster of docker servers.