Project file address: GitHub code address
phpdocker
contain:
- memcached:alpine
- mailhog/mailhog:latest
- repeat: Alpine
- mysql:5.7
- nginx:alpine
- php:7.4
Following the establishment in case your server has been installed docker, and if not refer to the installation: install docker under linux
1, download the code
Execute the code:
git clone https://github.com/allendaydayup/phpdocker.git phpdocker
2, run the project
Execute cd phpdocker, first go to phpdocker directory, and create a public directory, this directory is nginx default configuration file in the root directory, you can modify phpdocker / nginx / nginx.conf configuration according to your own situation
carried out:
docker-compose up -d
Perform final results are as follows:
3, unforeseen circumstances
- If the execution prompted docker-compose command can not find the words refer to: install docke-compose under linux
- The implementation process may be disconnected several times, reported similar errors below, do not worry, this is a network problem, access to foreign docker.io obstacles Repeat docker-compose up -d on the line until all tips done