Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The meaning and purpose of the volume field of the dockerfile file #736

Closed
cai-hd opened this issue Dec 28, 2020 · 1 comment
Closed

The meaning and purpose of the volume field of the dockerfile file #736

cai-hd opened this issue Dec 28, 2020 · 1 comment
Labels
question Usability question, not directly related to an error with the image

Comments

@cai-hd
Copy link

cai-hd commented Dec 28, 2020

When I run the container using the mysql:5.7.32 image, like this:

docker run -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7.32

When I run a new container every time. A new volume will be generated in the /var/lib/docker/volume directory,
I understand this because there is a data volume declared in the dockerfile file.

image

But I have two questions.

  1. What is the purpose of this anonymous volume ?
  2. When I started the container, the volume generated was about 200MB. I deleted the container, but the volume still exists and I need to delete it manually. What is the meaning of this design?
@wglambert wglambert added the question Usability question, not directly related to an error with the image label Dec 28, 2020
@wglambert
Copy link

There's a previous discussion on this over at #255

@cai-hd cai-hd closed this as completed Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

2 participants