Docker-compose 1
欲控制多組containers,可以使用現有manage multi-processes軟體如:Supervisor…等
但也許會出現一些問題 http://stackoverflow.com/questions/30034813/best-way-to-manage-docker-containers-with-supervisord
Docker官方提供Compose來執行控制多組containers
https://github.com/docker/compose/
Compose is a tool for defining and running multi-container Docker applications.
安裝…
1 | $ wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python |
docker run 轉成 docker-compose yaml 語法…
1 | # docker run -itd --name jeff --restart=always -p 9080:9080 -v /home/jeff/code/:/home/code centos |
同一目錄下執行…
docker-compose up -d
Check…
docker inspect jeff