I'm new to docker, I need to have a container that is running a mysql server, and when I modify the data in the db, do a commit and push to docker hub, my partner downloads it and has the same data as me.
I'm new to docker, I need to have a container that is running a mysql server, and when I modify the data in the db, do a commit and push to docker hub, my partner downloads it and has the same data as me.
First of all, you must understand that in the first instance, the container data is volatile, so 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 on the volume.
Then, you will have to create a docker image that binds that volume (you will have to make a dockerfile). Once uploaded to your repository, your partner can download it.