docker run --name db -d --net net1 -v $(pwd)/db/data:/var/lib/mysql --env-file ./db/env.list mysql:5.7
mysql跑起来了:
root@09-1:/simon-testing/wordpress# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d512e5e68e6e mysql:5.7 "docker-entrypoint.s…" 4 seconds ago Up 3 seconds 3306/tcp, 33060/tcp db
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e160335b6070 nginx:alpine "nginx -g 'daemon of…" 56 seconds ago Up 54 seconds 0.0.0.0:80->80/tcp nginx
1e0276d9a234 mysql:5.7 "docker-entrypoint.s…" 19 minutes ago Up 19 minutes 3306/tcp, 33060/tcp db
80f68202f960 wordpress:5-php7.2 "docker-entrypoint.s…" 25 minutes ago Up 25 minutes 0.0.0.0:8080->80/tcp wp