0

I had a mysql docker container. I have run it with following command:

docker run --name=dockername -p 3306:3306 -d mysql/mysql-server:latest

As you can see, I didnot mention any volume, so it was default volume.

After facing some restarting issue, I removed docker container with

docker rm dockername

I didnot remove the volume directly with -v command. Now the previous container is removed and I have run a new container with docker-compose. But need those previous data.

Is it possible to get those data as sql file?

  • I guess it is too late to recover it. – Gurkan İlleez Dec 16 '21 at 10:52
  • Since the image's Dockerfile is configured to always put the database data in a volume (via the `VOLUME` directive) there should be an anonymous volume that has the data; the linked question describes the process of finding and re-using it. – David Maze Dec 16 '21 at 12:16

0 Answers0