java - Save tables in Docker container -


i need advice best practice, maybe. need start web application web server , database. how link web server database found out. have problem db.

if wanna save tables after server down (server containers start). know information of container reset after delete. know verbose folders(-v flag) don't know mysql save it's tables , other information , don't know idea.

so, tell me how correctly save created tables in container?

you can take @ tutorial:

https://github.com/tutumcloud/tutum-docker-mysql

basically, have mysql on machine , then, on /var/lib/mysql , can start container:

docker run -d -p 3306:3306 -v /var/lib/mysql:/var/lib/mysql tutum/mysql

in case, i'm using tutum/mysql image. mounting database file volume host container. when container goes down, still have data on machine.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -