In order to setup a fully functional MySQL server via docker I use the following consolidated command:
docker run \
--publish 6603:3306 \
The advantage of the above approach is that the configuration files can be defined under ~/Docker/mysql/conf.d folder on my system and it will be picked up whenever I bootup this instance. The second thing is that all information written by this instance will be stored outside of VM in the path ~/Docker/mysql/mysql-datadir on my system. So In case this VM goes away due to some unexplained reasons I can still bootup another docker instance of MySQL and point it to this data directory.