Docker cloning mysql image for backup

229 views Asked by At

I am using a docker container that provides me a mysql database. I would like to make it as git branches. I wish to clone to container start it, make some db changes, then start another container in which all changes are discarded.

I was trying to use this post https://www.scalyr.com/blog/create-docker-image/ I created a container, then committed, created an image from container and then another container based on this new image. Let's say I have db1, db2 containers. I start db1 rename a table, stop it and then start db2. I wish that this table name is old. But after starting db2 I see the same table name as in db1. What I am doing wrong? What am I doing wrong? Is it possible to have an independent container clone?

0

There are 0 answers