I am interested in saving an image file with MySQL running a database that I have defined in a MySQL .sql script file. How would I go about doing this please?
Thanks,
Wex
Share and learn in the Docker community.
I am interested in saving an image file with MySQL running a database that I have defined in a MySQL .sql script file. How would I go about doing this please?
Thanks,
Wex
Hi
Take a look at this:
This will create a image from a running container.
You can create a new image FROM https://hub.docker.com/_/mariadb/ and COPY your .sql file to /dcoker-entrypoint-initidb.d/ :
FROM mariadb
COPY MySQL.sql /docker-entrypoint-initdb.d/