DEV Community

Discussion on: Loading up a Docker database with data

Collapse
 
sammousa profile image
Sam

For larger datasets container launch will be really slow though. What we did was use a multistage docker image; first one imports the SQL files and launches the database which load them (slow), second part then copies the data dir to a fresh mysql image.

Collapse
 
mfurmaniuk profile image
Michael

I haven't done a large set, the full database of what I could build is around 2GB - not large but too much to move around in a repo. I can imagine how long that would take in docker, with MySQL Workbench it takes 20 minutes to complete. I'll have to keep your method in mind if I have to do a full restore