Docker Volume Mount | docker run -v (--volume) | Docker for beginners #6

preview_player
Показать описание
In this short tutorial, we discuss the concept of volume mounting in docker.

Chapters:
0:00 - What is volume mounting?
0:50 - Example of volume mounting using ubuntu image
5:40 - When is volume mounting helpful?

Tags: #docker #containers #volumes #volume-mounting #awesome #coding #easy #virtualization
Рекомендации по теме
Комментарии
Автор

Thank you for such a easy to follow tutorial on Docker Volumes

sanchitjaiswal
Автор

The example you took was right, but the explaination is incorrect.
1--> Data to not get lost if a container is stopped or basically when you exit.
2--> But when you remove a container, then data inside that container will be lost.
3--> That is the scenario in this example.
When he again use run command actually a completely different new container is created, and it will obviously not have the file created in previous container.
It you restart the same container, you can find that same file there .

But if in case we delete that container, then surely the data will be lost. Even to persist the data irrespective of that container existence, that is the scenario when volume mounting is useful.

UdbhavGupta-bk