Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
What is Docker Volume | How to create  Volumes | What is Bind Mount | Docker Storage
Play lesson

Docker - What is Docker Volume | How to create Volumes | What is Bind Mount | Docker Storage

5.0 (3)
29 learners

What you'll learn

This course includes

  • 4 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

11:26 Bind mount More about Raghav - https://automationstepbystep.com/ Today we will learn: 1. What are Volumes 2. How to create / list / delete volumes 3. How to attach volume to a container 4. How to share volume among containers 5. What are bind mounts Volumes are the preferred mechanism for persisting data generated by and used by Docker containers : docker volume //get information : docker volume create : docker volume ls : docker volume inspect : docker volume rm : docker volume prune Instead of deleting containers one by one of docker ps -a , we can use docker container prune. and for docker ps (running containers) we can use docker rm $(ps -aq) Use of Volumes =========== Decoupling container from storage Share volume (storage/data) among different containers Attach volume to container On deleting container volume does not delete Commands docker run --name MyJenkins1 -v myvol1:/var/jenkins_home -p 8080:8080 -p 50000:50000 jenkins docker run --name MyJenkins2 -v myvol1:/var/jenkins_home -p 9090:8080 -p 60000:50000 jenkins docker run --name MyJenkins3 -v /Users/raghav/Desktop/Jenkins_Home:/var/jenkins_home -p 9191:8080 -p 40000:50000 jenkins References https://hub.docker.com/_/jenkins/ https://docs.docker.com/storage/volumes/ NOTES By default all files created inside a container are stored on a writable container layer The data doesn’t persist when that container is no longer running A container’s writable layer is tightly coupled to the host machine where the container is running. You can’t easily move the data somewhere else. Docker has two options for containers to store files in the host machine so that the files are persisted even after the container stops VOLUMES and BIND MOUNTS Volumes are stored in a part of the host filesystem which is managed by Docker Non-Docker processes should not modify this part of the filesystem Bind mounts may be stored anywhere on the host system Non-Docker processes on the Docker host or a Docker container can modify them at any time In Bind Mounts, the file or directory is referenced by its full path on the host machine.  Volumes are the best way to persist data in Docker volumes are managed by Docker and are isolated from the core functionality of the host machine A given volume can be mounted into multiple containers simultaneously. When no running container is using a volume, the volume is still available to Docker and is not removed automatically. You can remove unused volumes using docker volume prune. When you mount a volume, it may be named or anonymous.  Anonymous volumes are not given an explicit name when they are first mounted into a container Volumes also support the use of volume drivers, which allow you to store your data on remote hosts or cloud providers, among other possibilities. #DockerVolume #DockerBindMount #DockerContainers #DockerTutorials #DockerTraining #DevOpsTools #DevOpsTraining #DockerCommands #DockerForBeginners #DockerFreeTutorials #DockerforDevOps DOCKER PLAYLIST https://www.youtube.com/playlist?list=PLhW3qG5bs-L99pQsZ74f-LC-tOEsBp2rK YOUTUBE PLAYLIST https://www.youtube.com/channel/UCTt7pyY-o0eltq14glaG5dg/playlists YOUTUBE https://www.youtube.com/automationstepbystep FACEBOOK https://www.facebook.com/automationstepbystep TWITTER https://twitter.com/automationsbs If you like videos on the channel Automation Step by Step, hit the like button and share with others. Click the SUBSCRIBE button and hit the bell icon to keep getting new videos. ________ ONLINE COURSES TO LEARN ________ Visit - http://automationstepbystep.com/ ------------ Follow ------------ Youtube - http://youtube.com/automationstepbystep Share your knowledge with everyone and, Never Stop Learning Raghav

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere