This article is more of a proposal so feel free to comment and share your concerns and expertise.
Arguments like I hate docker; I will switch to something else; I like X don't count. So please be constructive.
The single biggest problem we are trying to solve with Docker is software package management. So I am
Current implementation and problems
Currently, EasyEngine supports two distros – Ubuntu and Debian in limited ways. By limited, we mean that for Ubuntu we support LTS releases and for Debian – we support few latest releases.
We maintain our own Nginx build at https://build.opensuse.org/project/show/home:rtCamp:EasyEngine. It is outdated and we are finding it hard to keep it updated. Testing different distros with every version is a very time-consuming task.
Then for some packages like PHP, we rely on different third parties for Ubuntu and Debian. We need to carefully test for differences. Otherwise, the same command might behave differently on Ubuntu and Debian.
The problems don't end here. Many times hosting companies have their own base images for Ubuntu/Debian which are different than DigitalOcean and Amazon AWS base setup. Many EasyEngine issues related to installation failure are related to differences in base images.
Also, there are some futuristic problems to deal. We want to use EasyEngine on Mac (most of our dev team uses Mac for WordPress development). Now we need to add more codes to deal with
brew based packages!
Expectation from Docker
Our goal is to replace apt/brew/yum based packages with docker images and containers. This is what we want to achieve at a bare minimum.
We might keep everything
The added advantages will be reduced local development and production parity. It is a minimum requirement of a decent development workflow.
A good side effect might me viability of most demanded shared-hosting feature. The processes running in composer are run in isolation!
How we are planning to use Docker?
This is not going to be easy. There are many decisions to be made that will affect all of us.
The current idea is to use docker-compose to define a site’s stack. So EasyEngine site creation commands will generate a
docker-compose.yml file based on parameters.
There are many docker-compose files on the Internet to run entire WordPress site but 10up's wp-local-docker is best and closed to our vision.
We have tested WordPress site creation using orchestration tools like Docker Swarm or Kubernetes but there is no plan to put them in EasyEngine core.
We want to make EasyEngine core as small as possible and move all functionality to the EasyEngine command packages.
For now, if you are a docker expert, please have a look at this Github issue which is more like a checklist for what we think of as an acceptable Docker-based solution.
We understand that not everyone is Docker expert. We ourself are new to it! But if nothing else, please contribute test-cases to checklist as comments on the Github issue. 🙏