Docker LEMP stack build

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,

  1. Containers should be ephemeral
  2. Use a .dockerignore file
  3. Avoid installing unnecessary packages
  4. Each container should have only one concern as “one process per container” may not be all-time true.
  5. Minimize the number of layers
  6. Sort multi-line arguments
  7. 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.

Github Hanswang/docker-lemp

From this repo, we take use of docker-compose.