通过yml文件配置好docker镜像,然后使用命令
1
|
docker-compose -f xxx.yml up -d |
创建container,如果想快速清除有一个方便的方法
1
|
docker-compose -f xxx.yml rm - v |
https://www.cnblogs.com/gelandesprung/p/12112420.html#:~:text=docker-compose%E5%AE%8C%E5%85%A8%E6%B8%85%E9%99%A4%20%E9%80%9A%E8%BF%87yml%E6%96%87%E4%BB%B6%E9%85%8D%E7%BD%AE%E5%A5%BDdocker%E9%95%9C%E5%83%8F%EF%BC%8C%E7%84%B6%E5%90%8E%E4%BD%BF%E7%94%A8%E5%91%BD%E4%BB%A4%201%20docker-compose%20-f%20xxx.yml%20up,-d%20%E5%88%9B%E5%BB%BAcontainer%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%83%B3%E5%BF%AB%E9%80%9F%E6%B8%85%E9%99%A4%E6%9C%89%E4%B8%80%E4%B8%AA%E6%96%B9%E4%BE%BF%E7%9A%84%E6%96%B9%E6%B3%95%201%20docker-compose%20-f%20xxx.yml%20rm%20-v
通过yml文件配置好docker镜像,然后使用命令
1
|
docker-compose -f xxx.yml up -d |
创建container,如果想快速清除有一个方便的方法
1
|
docker-compose -f xxx.yml rm - v |