[docker] docker-compose 管理lnmp容器
1. docker-compose介绍和命令详解
[链接1] https://yeasy.gitbooks.io/docker_practice/content/compose/
[链接2] https://www.jianshu.com/p/658911a8cff3
2.编写docker-compose.yml, #docker-compose config 验证书写格式
networks: lnmp: driver: bridge services: mysql: container_name: mysql environment: MYSQL_ROOT_PASSWORD: '123456' image: mysql networks: lnmp: null ports: - 13306:3306/tcp volumes: - E:\Docker\mydata:/var/lib/mysql:rw - E:\Docker\myconf:/etc/mysql:rw nginx: container_name: nginx depends_on: - mysql - php image: nginx:v1 networks: lnmp: null ports: - 8888:80/tcp volumes: - E:\Docker\wwwroot:/home/wwwroot:rw - E:\Docker\wwwlogs:/usr/local/nginx/logs:rw - E:\Docker\wwwconf:/usr/local/nginx/conf:rw php: container_name: php image: php:v1 networks: lnmp: null volumes: - E:\Docker\wwwroot:/home/wwwroot:rw - E:\Docker\phplogs:/usr/local/php/var/log:rw - E:\Docker\phpconf:/usr/local/php/etc:rw version: '2.0' volumes: mysql: driver: local
相关推荐
链块学院 2020-11-06
afanti 2020-09-14
白开水 2020-07-19
liyansring 2020-07-18
shenzhenzsw 2020-07-18
啦啦啦啦啦 2020-06-28
yangliuhbhd 2020-06-12
小爷有点狂 2020-06-12
无风的雨 2020-06-12
changecan 2020-06-11
蒜蓉粉丝蒸扇贝 2020-06-10
lihongtai 2020-06-08
liaochaowu 2020-06-06
zwt00 2020-06-05
scmrpu 2020-06-02
kuzilala 2020-05-14
小信 2020-05-14