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 .
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 .
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.