Closed rankun203 closed 9 years ago
@rankun203 mounting the file or volume is one way of doing it. another way would be to add --volume=/run/mysqld:/run/mysqld
to the run command to expose the mysql domain socket to the host. Now you can install mysql-client on your host and access the server in the container via the unix domain socket.
Thank you @sameersbn, That's also a way to achieve that. I add a user to mysql, and use a local mysql client to connect it through SSH :-)
I'm wondering if there is an easier way to init the database just after Docker build.
@rankun203 at the moment there is no way to specify an init script to initialize the database.
Mount a file to the container? Maybe that's too complicate.
Like init scripts.