I have a docker-compose.yml file like this
version: '2'
services:
wordpress:
image: wordpress
ports:
- 8080:80
environment:
WORDPRESS_DB_NAME: my_wp
WORDPRESS_DB_USER: my_user
WORDPRESS_DB_PASSWORD: my_pass
volumes:
- ./src:/var/www/html
mysql:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: my_pass
volumes:
- ./db:/etc/mysql
I can run my containsers using the command docker-compose up and it works fine, but shows the default wordpress site with empty db to setup. What I want is, I have a db dump file my_db.sql which I want to load into mariadb when its initializing. How can I do that? and where do I need to put my my_db.sql file to be picked by mariadb container?