i working official wordpress docker image docker-compose on mac (using boot2docker). need one-off data import. i'm not sure how this. how can import data database container?
wordpress: image: wordpress links: - db:mysql ports: - 8080:80 volumes: - .:/var/www/html/wp-content/themes/my-theme-name db: image: mariadb environment: mysql_root_password: example
when using official wordpress image, default name of created database wordpress
.
so after have deployed wordpress application docker-compose, can import wordpress database by
docker exec -i db mysql -uroot -pexample wordpress < dump.sql
Comments
Post a Comment