web:
image: igontarev/php-server
ports:
- "80:80"
- "443:443"
volumes:
- ./www:/var/www
- ./sites:/etc/nginx/sites-enabled
- ./logs/nginx:/var/log/nginx
- ./logs/php:/var/log/php
- ./cron:/etc/cron.d
- ./supervisor:/etc/supervisor/conf.d
- ./letsencrypt:/etc/letsencrypt
- ./lib/letsencrypt:/var/lib/letsencrypt
db:
image: mysql:5.7
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=nimda2017
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
30b0b955fdca igontarev/php-server "/usr/bin/supervisord" 7 seconds ago Up 6 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp docker_web_1
1d7ad0ed6081 mysql:5.7 "docker-entrypoint..." 7 seconds ago Up 6 seconds 0.0.0.0:3306->3306/tcp docker_db_1
127.0.0.1
, вот рабочий сценарий:docker run --name db_test \
-e MYSQL_DATABASE=test \
-e MYSQL_ROOT_PASSWORD=root \
-p 3306:3306 \
-d mysql:5.5
mysql-client
, можно использовать любой клиент, пользуюсь консолью, накатить дамб:MYSQL_PWD=root mysql \
-u root -h 127.0.0.1 \
--init-command="SET SESSION FOREIGN_KEY_CHECKS=0;" \
test < dump.sql
MYSQL_PWD=root mysqldump \
-u root -h 127.0.0.1 \
--compact \
--add-drop-table \
--extended-insert=FALSE \
test_moco_core > dump.sql