How to have a mysql container that updates my db in Docker Hub?

0

I am new with docker, I need to have a container that is running a mysql server, and that when I modify the data of the db, do a commit and push to docker hub, my partner downloads it and has the same data as me .

    
asked by Johnny Pachecp 23.02.2018 в 17:07
source

1 answer

1

First, you must understand that in the first instance, the container data are volatile, so that when the container dies, everything is reset. Therefore, to get persistent data, you must mount as volume / var / lib / mysql or the directory where you have the mysql data. That way, if the container dies, the data will remain in the volume.

Next, you'll have to create a docker image that binds that volume (you'll have to do a dockerfile). Once uploaded to your repository, your partner will be able to download it.

    
answered by 13.04.2018 / 10:43
source