李明
|
linux下安装 Docker Compose
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-composesudo chmod +x /usr/local/bin/docker-composesudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose 命令行工具docker-compose
pwdcurl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://b81aace9.m.daocloud.iosudo docker-compose -f docker-compose.yml up
sudo docker-compose ps
sudo docker-compose stopsudo docker-compose startsudo docker-compose down
sudo docker-compose images
sudo docker-compose upsudo docker-compose exec 容器名 bash flask 和redis docker-compose 实例 标题上边有源码地址
pwd more Dockerfilemore app.py more docker-compose.yml
sudo docker-compose up
PS: docker-compose的概念有直观的理解,包括compose的命令行和使用。建议使用docker-compose up -d 后台来运行,如果不后台运行很麻烦ctrl+c的话上边的应用就关闭了。
|
2018-09-23 00:33:33