I want to create an image that will have mysql with the database included.
mysql container and imported DB with the steps:
docker run --name mysql-container -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7.9
catalogmysql db inside of the container
docker exec -i mysql-container mysql -uroot -proot catalog < sample.sql
Then I pushed the image into the DockerHub:
docker tag <image-id> tenzan/mysql-container:20151210
docker push tenzan/mysql-container
But it seems, the pushed
tenzan/mysql-container won’t include the database created in step #3.
I want to automate the steps 1-3.
docker-compose.yml? And what’s the commands?
How to create image with the database included? Let me know if I’m on the wrong way.