Installation docker-compose
According to the official website operation
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m`> / usr / local / bin / docker- Compose
# too slow!
Mirroring the domestic reference article https://blog.csdn.net/huiyanghu/article/details/82253886
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Version Confirmation
docker-compose --version
docker-compose version replacement (upgrade)
Simply replace the current version number to the url (premise: the need to correspond with the official version)
docker-compose version 1.25.4, build 8d51620a
docker-compose command
Docker- $ Compose and create start up all containers # Docker $ -compose up - d # created and run in the background all the way to start container Docker $ - Compose up nginx PHP mysql # created and start nginx, php, mysql of multiple containers Docker $ -compose up - d nginx PHP MySQL # created and has been running in the background mode start nginx, php, mysql container Docker $ - Compose Start to start the service PHP # Docker $ - Compose PHP STOP # Stop Service Docker $ - Compose restart the service restart PHP # Docker $ - Compose # Build PHP to build or re-build service Docker $ -compose RM php # delete and stop php container Docker $ -compose Down # stop and remove container, networks, image and mount volumes