How to Use docker Correctly to Build lnmp Environment?

  docker, question

Host environment: window10+virtualbox;;

I want to use docker to build a php development environment. After groping for some time, I am a little confused now.
Should I design and build the environment I need by running three containers: php container, mysql container and nginx container?
The above thought should be correct, then, when I build the above three containers, do I have to perform the following process operations:
1. Install centos system.
2. Services required to install the container, such as php or mysql;
3. Install ssh

In fact, I just want to ask, does every service container have to be installed with a system environment like centos first, but after this ordeal, I found that the size of a pure nginx container (nginx+centos+ssh) has reached about 500m, so I wonder if this is the right way to go?

First of all, using docker will definitely take up more memory. If this is not a problem, you can use it.laradockIt is convenient and quick, and saves himself. Here is an articleMac Environment Builds docker’s PHP Development Environment, windows host is the same.