标签:案例 lnmp nod 图片 vol pre load mysql and
[root@node201 ~]# cat docker-compose.yml
version: ‘3‘
services:
web:
build:
context: ./
dockerfile: Dockerfile
#image: nginx
ports:
- "88:80"
- "89:80"
networks:
- lnmp
db:
image: mysql:5.7
command: --character-set-server=utf8
environment:
- MYSQL_ROOT_PASSWORD=shinibaba
networks:
- lnmp
volumes:
- "mysqldata:/var/lib/mysql"
networks:
lnmp: {}
volumes:
mysqldata: {}
# 构建并运行
docker-compose -f docker-compose.yml up -d --build
LNMP
LNMT
标签:案例 lnmp nod 图片 vol pre load mysql and
原文地址:https://www.cnblogs.com/ly447742/p/14440292.html