Docker is great. It provides lightweight virtualization with almost zero overhead.
And out here are tons of articles about docker best practice It has short-versioned bullet points as below,
- Containers should be ephemeral
- Use a .dockerignore file
- Avoid installing unnecessary packages
- Each container should have only one concern as “one process per container” may not be all-time true.
- Minimize the number of layers
- Sort multi-line arguments
- Build cache
Given docker is so good to have, I took an initiative with the intention of putting general PHP development env into docker. So I built a small git repo about docker lemp stack.
From this repo, we take use of docker-compose.