virtual machine - Why the docker keeps both image and image container on VM? -


the problem encounter when working large images docker copies data when create container it: having 25gb image , container totally takes 50gb on docker vm. am doing wrong or docker function that? if so, why? e. g. in git may use code directly after clone repo, of time don't need make 1 more additional copy of branch or whatever.

p. s. use case following: want keep different versions of mysql database (because changed exclusively developers , happens not often) , because want enable fast restoration (the way mysql allows restoration *.sql file , takes 7 hours - long able play db freely)

mysql databases use volumes @ least official image. need 2 containers withe same image using different named volumes:

docker create volume devdb docker run --name devdb -v devdb:/var/lib/mysql -p 3306:3306-e mysql_root_password=my-secret-pw -d mysql 

then you:

docker create volume mydb docker run --name mydb -v mydb:/var/lib/mysql -p 3307:3306 -e mysql_root_password=my-secret-pw -d mysql 

and afraid docker copies image content new container. not sure that.

regards


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -