Webdesign Tutorials & Tips

Tutorial #6 | What is Docker volume and How to mount a host directory volume? | Engineer

Your video will begin in 7
You can skip to video in 3

Thanks! Share it with your friends!


You disliked this video. Thanks for the feedback!

Sorry, only registred users can create playlists.


In this video, I have explained how to manage data within a Docker container.

Docker volumes are the preferred way to persist data in docker container and services. This helps us to manage data within our docker containers. It separates out the container’s lifecycle from the data.

Two ways to manage your data within docker is:

1) Docker volumes
2) Docker volume containers

Few commands from today's video:

docker run -it -v /data --name container1 ubuntu //Mounting a data volume
docker ps -a //should see our container
docker inspect container1 // it shows info about docker container
docker restart container1 //restart the container
docker attach container1 //open container in interactive mode

docker run -it --name container1 -v /Users:/datavolume ubuntu //Mounting a host directory as a data volume
docker run -it --volumes-from container1 --name container2 ubuntu //create docker volume container

Important playlists
Data Structures https://www.youtube.com/watch?v=ZWZQGstU9Qo&list=PLF5kUO89mjNoO70XyBfHnxgBAhV3EW_pZ
Linux: https://www.youtube.com/watch?v=QpUkDQ3hUV0&list=PLF5kUO89mjNqVhM7JHOsZbSNhNtADlQl7
SonarQube: https://www.youtube.com/watch?v=uHySaQfQrtw&list=PLF5kUO89mjNrJ5A9iuElDGYMJ2zwh1-J7
Docker: https://www.youtube.com/watch?v=_ahpOukFh3M&list=PLF5kUO89mjNpyGoG3Z66TfoSX8vRJw9sy

You can follow me on:

Instagram: https://www.instagram.com/engineerhooon/
LinkedIn: https://www.linkedin.com/in/sunny-shaw/
Github: https://github.com/sunny-shaw
Medium: https://medium.com/@sunnyshaw_12357

|| Subscribe and hit the bell button to get latest content ||

#docker #dockervolume #whatisdockervolume #mountinghostdirectory

Post your comment