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

Поділитися
Вставка
  • Опубліковано 4 жов 2024
  • 11:26 Bind mount
    More about Raghav - automationstep...
    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
    hub.docker.com...
    docs.docker.co...
    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
    • Docker
    UA-cam PLAYLIST
    / @raghavpal
    UA-cam
    / automationstepbystep
    FACEBOOK
    / automationstepbystep
    TWITTER
    / 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 - automationstepb...
    ----------- Follow -----------
    UA-cam - / automationstepbystep
    Share your knowledge with everyone and,
    Never Stop Learning
    Raghav

КОМЕНТАРІ • 611

  • @gautamdikshit9888
    @gautamdikshit9888 3 місяці тому

    Thank you. By far the most easy to follow explanation I've come across.

    • @RaghavPal
      @RaghavPal  3 місяці тому

      Most welcome Gautam.. humbled

  • @ramiworkstation
    @ramiworkstation 4 місяці тому

    Thank you very very very much for the lesson. What I like the most about your videos is that you teach in a calm and relatively slow pace. Which in my opinion is the key for successful learning. I send you love and blessing. Big like and subscribe from me. 🌻

    • @RaghavPal
      @RaghavPal  4 місяці тому

      Thanks a lot Rami.. humbled

  • @beunmin6
    @beunmin6 5 років тому +5

    All of your tutorial with docker is easy to understand and easy to digest. Thank you for making this. This helps a lot.

    • @RaghavPal
      @RaghavPal  5 років тому

      You're welcome Angelo

  • @prithvirajsingh8537
    @prithvirajsingh8537 4 роки тому +1

    Easy, simple informative video thank u sir

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      Most welcome Prithviraj

  • @guptasaurabh688
    @guptasaurabh688 4 роки тому +4

    This is very easy and good explanation Raghav. You represent things in simple way. I really appreciate. 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 $(docker ps -aq).

    • @RaghavPal
      @RaghavPal  4 роки тому

      Thanks for adding Saurabh

  • @maazkhan6489
    @maazkhan6489 4 роки тому

    very simple ....yet powerful explanation.

  • @dragonball41876
    @dragonball41876 3 місяці тому

    Much appreciate with some simple but to-the-point examples! You are a really good teacher!

    • @RaghavPal
      @RaghavPal  3 місяці тому

      Glad it was helpful

  • @ethanrose6950
    @ethanrose6950 8 місяців тому

    the only resource on the internet that did not throw an error--including the documentation. thanks!

    • @RaghavPal
      @RaghavPal  8 місяців тому

      Glad to know it helped Ethan

  • @samuelopoku-acheampong5601
    @samuelopoku-acheampong5601 Рік тому

    Super, all of your tutorial with docker is easy to understand and easy to digest.

  • @rameshjp7045
    @rameshjp7045 4 роки тому +1

    Perfect! Understood docker volume in 15 minutes. Thanks a lot!

    • @RaghavPal
      @RaghavPal  4 роки тому

      You are welcome Ramesh

    • @HK-sw3vi
      @HK-sw3vi 2 роки тому

      took me 15.07 mins

  • @ranjithreddych
    @ranjithreddych 4 роки тому +2

    After reading tons of info and still confused,this video really helped. Thanks a lot.

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      Happy to know this Ranjith

  • @OddBallTrails
    @OddBallTrails 5 років тому +1

    You are more than a teacher. I am glad I found you. Thank you so so so much.

    • @RaghavPal
      @RaghavPal  5 років тому

      Thanks Mukesh, humbled by your message

  • @jsemblano9819
    @jsemblano9819 6 місяців тому

    As always Raghav awesome. I already “know” you a few years and you never disappoint

    • @RaghavPal
      @RaghavPal  6 місяців тому

      Thanks a ton J Semblano.. humbled

  • @mazharulboni5419
    @mazharulboni5419 9 місяців тому

    Very well explained for the beginners. Thank you Raghav

    • @RaghavPal
      @RaghavPal  9 місяців тому

      Thanks and welcome Mazharul

  • @pavithren
    @pavithren 2 роки тому

    Thanks Raghav! You have explained the concept clearly and succinctly.

    • @RaghavPal
      @RaghavPal  2 роки тому +1

      Glad it was helpful!

  • @heshanwijeratne2155
    @heshanwijeratne2155 2 місяці тому

    I am a student currently learning Docker and have struggled to find clear explanations about Docker volumes. Your video is very clear, your voice is easy to understand, and as a thank you, I am now following you. Thank you again and again! i will be sharing your channel and your website with my colleagues too !!

    • @RaghavPal
      @RaghavPal  2 місяці тому

      You're very welcome Heshan.. humbled

  • @nawalsingh1789
    @nawalsingh1789 5 років тому +24

    Wonderful explanation. I was really looking for such kind of video, easy, practical, and live with all the details.
    Thank you very much. Keep posting more videos.

    • @RaghavPal
      @RaghavPal  5 років тому +1

      You're welcome Nawal.

  • @VinothKumar-jw7iy
    @VinothKumar-jw7iy 2 роки тому

    Thank you very much for this tutorial am very new to docker and learning the concept one by one, your tutorial is more helpful to learn docker.

  • @manojishere
    @manojishere 2 роки тому

    Very well explained with simple use cases

    • @RaghavPal
      @RaghavPal  2 роки тому

      Glad it was helpful Manoj

  • @nawazali6903
    @nawazali6903 4 роки тому +3

    Thanks for putting this video together. Clear and to-the-point. Keep up the good work!

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad it was helpful Nawaz

  • @prashanth6848
    @prashanth6848 4 роки тому

    this video is very informative. very well explained for begineers. thanks

    • @RaghavPal
      @RaghavPal  4 роки тому

      You're very welcome Prashanth

  • @LeonRamkumar
    @LeonRamkumar 4 роки тому +1

    My god, I've been struggling with the binds for days! Thanks, I now finally get it. I'm an absolute docker beginner.

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      Glad I could help Leon

  • @84prabhumishra
    @84prabhumishra 4 роки тому

    one of the best content over internet on docker volumes.

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      Happy to see this Prabhu

  • @manojnaidu619
    @manojnaidu619 2 роки тому

    Amazing walkthrough. Loved it✌

  • @pakc2690
    @pakc2690 3 роки тому

    Thank you so much. Best explanation ever!

  • @anurasenarathna1703
    @anurasenarathna1703 Рік тому +1

    A very good series. Thank you very much for sharing your knowledge.

  • @IAm-xr2xh
    @IAm-xr2xh 4 роки тому

    I'm really like your videos. It's very clear and helpful. Thanks for your videos.

  • @richardbryangragasin5069
    @richardbryangragasin5069 4 роки тому

    great job! i will share this to my colleagues

    • @RaghavPal
      @RaghavPal  4 роки тому

      Awesome, thank you Richard

  • @NasirAli-hs8np
    @NasirAli-hs8np 3 роки тому

    Love you Raghav! God bless you kind sir!

  • @hd3adpool
    @hd3adpool 4 роки тому +4

    Real quality videos with precise and clear explanation. I am grateful for these videos as they teach me so much in mere few minutes. Thanks a ton brother.

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      You're welcome Harshil

  • @glyakk
    @glyakk 4 роки тому

    This made understanding volumes crystal clear, much appreciated.

  • @prasenjitsaha5322
    @prasenjitsaha5322 4 роки тому +1

    Your way of explanation is great. Providing notes in the video description section is very helpful. Thanks for enlightening us with your knowledge.

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad it was helpful Prasenjit

  • @tamilkumarannamalai5545
    @tamilkumarannamalai5545 5 років тому +1

    Almost I learned basic .. today... Thank you very much !! Raghav

    • @RaghavPal
      @RaghavPal  5 років тому

      You're welcome, keep learning.

  • @farrukhahmedsid
    @farrukhahmedsid 4 роки тому

    Wow.. you easily explained it in detail. Excellent video!

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad you liked it Farrukh

  • @ashokreddypunyala9192
    @ashokreddypunyala9192 4 роки тому

    Hi Raghav, really you made my day Hatsoff to your explaination.

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      So happy to know this Ashok

  • @ateeqrehman6621
    @ateeqrehman6621 3 роки тому

    Thank you very much for this wonderful tutorial. Very Easy Very Informative.
    Love from Pakistan.

  • @enricosaccheggiani3192
    @enricosaccheggiani3192 3 роки тому

    Very good job Raghav. Congratulations !! Very well explained . Thanks a lot

  • @luxxart
    @luxxart 2 роки тому

    Really useful tutorial! Thank you!

  • @MerinNakarmi
    @MerinNakarmi Рік тому

    This tutorial is fantastic! Concise and to the point!

  • @guylemay1471
    @guylemay1471 6 років тому

    It reads like a Coconut-pie recipe my old granny used to have in her kitchen drawer ....I had to be a very good boy to get some of that pie - thank you so much!

    • @RaghavPal
      @RaghavPal  6 років тому

      So glad to read this . Thanks

  • @abhirupnandi442
    @abhirupnandi442 4 роки тому +1

    Very nice tutorial 👍. Simple & elegant. Thnks for making such useful tutorial 👍. Really learned a lot😀

    • @RaghavPal
      @RaghavPal  4 роки тому

      So nice of you Abhirup

  • @fahadshakeel3223
    @fahadshakeel3223 4 роки тому

    Simple and practical approach with all the necessary explanation to understand the concept fully. Good Job! Thanks..

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad it was helpful Fahad

  • @codenx2
    @codenx2 5 років тому

    You are awesome raghav, to the point. No extra talk. Thanks for the video.

    • @RaghavPal
      @RaghavPal  5 років тому

      Thanks a lot. Humbled

  • @PankajSharma-vg1ty
    @PankajSharma-vg1ty 2 роки тому

    Great explanation sir.
    Thank you😊

  • @be236
    @be236 4 роки тому

    Excellent tutorial on Docker Volumes!

    • @RaghavPal
      @RaghavPal  4 роки тому

      So happy to know this Andrew

  • @ezrachirii7006
    @ezrachirii7006 3 роки тому

    Thanks a lot i have been struggling to mount a volume on a windows machine the last bit saved me Great Content!

  • @Adam-gp3ij
    @Adam-gp3ij 4 роки тому

    Sir, you made this video since 2018 and its really helpful for me in 2020. Thank you so much from the heart

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      You're most welcome Adam, I will also be created latest videos. Check all here - automationstepbystep.com/

    • @Adam-gp3ij
      @Adam-gp3ij 4 роки тому

      Automation Step by Step - Raghav Pal i really want to learn Docker and Jenkins. I purchased a course from Udemmy, but was really hard to understand. Your way was amazing, I really got it from the first time. Your Jenkins and Docker courses are Kinda old? Do you have somewhere courses. I hope you have a Udemmy course. Please let me know. Much appreciated Adam

    • @Adam-gp3ij
      @Adam-gp3ij 4 роки тому

      Automation Step by Step - Raghav Pal I think I can see your courses on Udemmy. But I think Jenkins is old and I am not even able to install it on my Mac. However, can I get a promotion code for Docker course. Thank you

    • @RaghavPal
      @RaghavPal  4 роки тому

      Hi Adam, I will be creating Jenkins and Docker Udemy courses in some time.

  • @hiroyukinumaguchi1984
    @hiroyukinumaguchi1984 4 роки тому

    Your explanation is very easy to understand and informative! Thank you!!

    • @RaghavPal
      @RaghavPal  4 роки тому

      You're most welcome Hiroyuki

  • @nikhilgupta5721
    @nikhilgupta5721 4 роки тому

    Excellent Raghav!! You explained it very well with practical example. You Rock Man!! Waiting for more such like videos.

    • @RaghavPal
      @RaghavPal  4 роки тому

      Sure Nikhil, thanks for watching

  • @PhilipDenys
    @PhilipDenys 4 роки тому +7

    perfect run through... even learned a mac feature (splitscreen )

  • @vijayvaswani9717
    @vijayvaswani9717 4 роки тому

    Thanks Raghav,well explained..

  • @motolola
    @motolola 5 років тому

    Excellent, now I found a new favourite tech channel

    • @RaghavPal
      @RaghavPal  5 років тому

      Happy to know Akinjide.
      Best wishes,
      Raghav

  • @shashankchoubey4914
    @shashankchoubey4914 5 років тому +1

    Very nice explanation

    • @RaghavPal
      @RaghavPal  5 років тому

      Thanks for watching Shashank

  • @annakhuseinova8162
    @annakhuseinova8162 5 років тому +3

    The way you explain things is amazing! :)

  • @nainglinthu753
    @nainglinthu753 Рік тому

    Thank you so much, I keep learning from you. Thanks, a lot.

  • @ParticleClara
    @ParticleClara 3 роки тому +1

    Thanks so much, this is exactly what I needed to know!

    • @RaghavPal
      @RaghavPal  3 роки тому

      You are so welcome Clara

  • @pradeepkumar-ol2mk
    @pradeepkumar-ol2mk 4 роки тому +1

    Wonderful explaination sir. Thank you soo much.It helped me a lott

    • @RaghavPal
      @RaghavPal  4 роки тому

      You are most welcome Pradeep, Do follow other sessions and let me know if you face any issue

  • @CharlieBelvo18
    @CharlieBelvo18 5 років тому +10

    thanks a million for the explanation and making a vid on this, really helped my understanding

    • @RaghavPal
      @RaghavPal  5 років тому

      You're welcome Charlie

  • @Michael17000
    @Michael17000 3 роки тому

    Beautiful tutorial run! Many thanks

  • @kevinye6288
    @kevinye6288 4 роки тому

    Just wanted to thank you Raghav Patel

  • @fyqwerty
    @fyqwerty 2 роки тому

    thank you , ı understant volumes easy with this video

  •  5 років тому +1

    Very useful explanation. Thank you very much!

    • @RaghavPal
      @RaghavPal  5 років тому +1

      You're welcome Bernd Glückert

  • @codestorywithMIK
    @codestorywithMIK 3 роки тому

    Amazing. Thanks for the practical examples.

  • @suhasiniiraghuwansh
    @suhasiniiraghuwansh 3 роки тому

    Very well explained the concept of volume and bind mount.. Thanks a lot

  • @arturo7392
    @arturo7392 4 роки тому

    Oh man... what an excellent explanation...! Thanks!

  • @ambikaprasad9464
    @ambikaprasad9464 4 роки тому

    Thanks a lot for such a nice explanation

    • @RaghavPal
      @RaghavPal  4 роки тому

      You are most welcome Ambika

  • @821ovi
    @821ovi 2 роки тому

    Great explanation. Thanks a lot.

    • @RaghavPal
      @RaghavPal  2 роки тому

      You are welcome Avijit

  • @TricoliciSerghei
    @TricoliciSerghei 2 роки тому

    Heyyy, thanks a ton!! Very nice video with a lot of useful information.

  • @deeptikulkarni618
    @deeptikulkarni618 5 років тому +2

    I like all of your videos... It's really very easy n interesting to understand compared to other over rated channels like edureka.. thanks a lot sir!!

    • @RaghavPal
      @RaghavPal  5 років тому +1

      So happy and humbled to see your message Deepti.

  • @gopalkrishnan7208
    @gopalkrishnan7208 4 роки тому

    Its Excellent Teaching and your videos

  • @nishamahendran1532
    @nishamahendran1532 2 роки тому +1

    Thank you so much for explaining about volume mapping in containers with hands on. Helped me a lot to understand easily. Can you also explain how this volume mapping is handled at the time of autoscaling the containers?

    • @RaghavPal
      @RaghavPal  2 роки тому

      Sure Nisha, will add more tutorials

  • @RadhaKrishna-kyc
    @RadhaKrishna-kyc 4 роки тому

    Fantastic tutorial Sir

  • @bvenkatvinay1087
    @bvenkatvinay1087 3 місяці тому

    I like your videos so much sir good explaination

    • @RaghavPal
      @RaghavPal  3 місяці тому

      Thanks and welcome

  • @veereshshenoy579
    @veereshshenoy579 3 роки тому

    Informative and easy to understand
    CHeers :)

    • @RaghavPal
      @RaghavPal  3 роки тому

      Glad it was helpful Veeresh

  • @gauravprajapati9987
    @gauravprajapati9987 5 років тому

    Simple and very easy to understand! Thanks!

    • @RaghavPal
      @RaghavPal  5 років тому

      You're welcome Gaurav

  • @akant74
    @akant74 4 роки тому +1

    Great content.. especially loved the "recap" credits with music at the end.

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad you enjoyed it Kenny

  • @nforlife
    @nforlife 3 роки тому

    My preferred teacher 🤗

  • @ravilanka5030
    @ravilanka5030 3 роки тому

    The best short videos with more info, thanks a lot sir,keep gng

  • @shankarvani7503
    @shankarvani7503 2 роки тому

    Thanks for this wonderful video

  • @SHELLAC85
    @SHELLAC85 4 роки тому

    Brilliant video. Thank you

  • @agkhantmin10
    @agkhantmin10 4 роки тому

    Thank you so much .Very helpful

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad it was helpful Robbin

  • @tareqnasif2880
    @tareqnasif2880 5 років тому +1

    u are amazing explaining. thanks man

    • @RaghavPal
      @RaghavPal  5 років тому

      You're welcome Tareq

  • @shantharamPK8160
    @shantharamPK8160 3 роки тому +4

    Very easy to understand tutorial.. 👌.
    I guess the problem with using port 70000 is exceeds the max allowed port no of 65535, which is a networking stipulation

    • @RaghavPal
      @RaghavPal  3 роки тому

      thanks for sharing Shantharam

  • @shibasisnayak6062
    @shibasisnayak6062 2 роки тому +1

    You explained very precisely. Really appreciated. But I have one concern here how can we will get our deleted container data.

    • @RaghavPal
      @RaghavPal  2 роки тому

      Hi Shibasis, I have not tried, here is some information on this - stackoverflow.com/questions/29202787/restore-deleted-container-docker

  • @poc3607
    @poc3607 4 роки тому

    Good explanation. Cheers

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad it helped Dimitar

  • @Ghost_1823
    @Ghost_1823 4 роки тому

    Nicely explained. Precise. Thanks :)

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad it was helpful Sayanta

  • @cryp0g00n4
    @cryp0g00n4 4 роки тому +1

    Hands down just amazing (the music)... and the teaching too ;)

    • @RaghavPal
      @RaghavPal  4 роки тому

      Thanks for the kind words

  • @AnandRaj-zy8qt
    @AnandRaj-zy8qt 5 років тому

    thanks raghav pal very useful !!!!!!!!!!!!!!

    • @RaghavPal
      @RaghavPal  5 років тому +1

      You're welcome Anand

  • @masumehjavanbakht9499
    @masumehjavanbakht9499 2 роки тому

    This was really excellent. Thanks a lot for making such a nice videos.

  • @nergalgreedes5763
    @nergalgreedes5763 5 років тому

    just wonderful. very well explained. Thank you.

    • @RaghavPal
      @RaghavPal  5 років тому +1

      You're welcome Nergalgreed

  • @nethajimeda5654
    @nethajimeda5654 5 років тому +1

    Excellent mostly at ending sharing key points shows u r 💖 love at work ...

    • @RaghavPal
      @RaghavPal  5 років тому +1

      Thanks for the message .

  • @amrExplore
    @amrExplore 6 років тому +6

    Very simple explanation with examples. Also if you can add networking module in addition will indeed help

    • @RaghavPal
      @RaghavPal  6 років тому +1

      Hi Anand, I will check that soon

  • @HXYZZZ
    @HXYZZZ 4 роки тому

    Expalined it very well. thank you.

  • @pmc23
    @pmc23 5 років тому

    I have watched your docker videos twice 😍 waiting for advanced docker tutorials :)

    • @RaghavPal
      @RaghavPal  5 років тому

      So happy to know this Harsha, I will do Advanced Docker. Cannot say a specific time, as I am engaged with multiple things, but will do it surely. Keep yourself subscribed to get notifications

  • @whoozthedev514
    @whoozthedev514 3 роки тому

    Awesome explanation
    ❤️

  • @ourtech6267
    @ourtech6267 3 роки тому

    Thank you .. !! Helped a lot

  • @zamundaking8108
    @zamundaking8108 4 роки тому

    Great work! Clear & simple. This helped me

  • @amitpatil746
    @amitpatil746 4 роки тому

    Explained very well. Thank you

  • @richardlanglois5183
    @richardlanglois5183 5 років тому +2

    Great presentation!

  • @nitinkaushik9764
    @nitinkaushik9764 5 років тому +1

    Superb. Very Simple explanation. keep up the good work.

    • @RaghavPal
      @RaghavPal  5 років тому

      You're welcome Nitin