I might be little late for answer and probably world knows about this now.
All you have to open your ports of docker container to access it. For example while running the container :
docker run --name mysql_container -e MYSQL_ROOT_PASSWORD=root -d
-p 3306:3306
mysql/mysql-server:5.7
This will allow your container's mysql to be accessible from the host machine. Later you can connect to it.
docker exec -it mysql_container mysql -u root -p