DEV Community

Discussion on: Learn Docker — from the beginning, part V Docker Compose, variables, volumes, networks and databases

Collapse
 
softchris profile image
Chris Noring

Thanks for that :)

From hub.docker.com/_/mysql
When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions .sh, .sql and .sql.gz that are found in /docker-entrypoint-initdb.d

if I understand your question correctly that's a whole chapter in the official Docker documentation, docs.docker.com/docker-hub/builds/