I am importing a large application to Docker. Part of the application is a database. I have dumped the database into .sql file and now I am trying to import it to the docker container running official mysql image by mounting a directory from host machine and issuing command
mysql -u myUsername -p myDB < /mountdir/databasedump.sql
The database dump is very large, more than 10GB. Everything goes well for an hour, but then it issues error
loop: Write error at byte offset
I have a feeling that the size of the container runs out.
Is there a smarter way in accomplishing the dockerization of the database? In case not, how can I import the enormous database to the container?