Exploring Docker [1] - Getting Started

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • In this video we will start to explore docker by talking about the benefits of Docker, looking at commands to work with containers and images, the Dockerfile and more
    Sponsor:
    DevMountain Bootcamp - goo.gl/6q0dEa
    Docker Help Gist:
    gist.github.co...
    💖 Become a Patron: Show support & get perks!
    / traversymedia
    Website & Udemy Courses
    www.traversymed...
    Follow Traversy Media:
    / traversymedia
    / traversymedia
    / traversymedia

Комментарии • 458

  • @TraversyMedia
    @TraversyMedia  6 лет назад +148

    There are 2 videos right now, this and the Node/Mongo setup. Let me know of any other Docker tutorials you would like added to the series as far as environment setup, etc (LAMP, Wordpress, Django, etc)

  • @TraversyMedia
    @TraversyMedia  6 лет назад +307

    I just want to mention, I am not pushing Docker or any tech ever on anyone. Some people take me making a tutorial as "You now have to use this". That is not my style. Please never feel like you HAVE to use anything anyone says (Unless it is your boss lol). Do what is best for your workflow. Do not get pressured by the industry that is constantly throwing tech at you. I am going to do a video on this subject soon

    • @shashanksshetty9870
      @shashanksshetty9870 6 лет назад +10

      Traversy Media thanks for this brad. To be frank we had learned a lot from you. It's because of you now we all are about to develop something new, Informative and you have guided us in our passion for coding. We respect your content and we will always look forward for your contents. Thank you. (sorry for my english)

    • @adriandinca5682
      @adriandinca5682 6 лет назад +2

      "Unless it is your boss lol" :))))
      You simply made my day sir! :D

    • @OlegMysianovuch
      @OlegMysianovuch 6 лет назад +7

      It will be very helpfully, if you create video about Kubernetes, because it's from box now, or dividing ENV to dev and prod with deploying it to real server. Also, very interesting subject for learning is load balancing in Docker =)

    • @bawonos024
      @bawonos024 5 лет назад

      Please do that video, Transversy Media. Looking forward to it. Coz every new tech keeps making head explode. Thanks. :D

    • @Nilkamalsha75
      @Nilkamalsha75 5 лет назад

      Looking forward for that video Brad

  • @michael.penrod
    @michael.penrod 6 лет назад +138

    One small analogy that helped me understand the difference between images and containers was consider images like the blueprints, containers are the actual house. You can't build the house without the blueprints (i.e. you need to download the image). Starting a container is like building the house and unlocking the door. Stopping a container is like locking the door. Deleting a container is like tearing the house down.

    • @SalemGTV
      @SalemGTV 5 лет назад +2

      tyty

    • @johndoyle3816
      @johndoyle3816 5 лет назад +3

      Nice analogy, I thought about it more in terms of using a daemon to burn game's image onto the computer so I can play the game without the cd.

    • @WhatMACHI
      @WhatMACHI 5 лет назад +1

      Nice analogy!

    • @zhitomirnedyalkow1666
      @zhitomirnedyalkow1666 4 года назад +1

      Good analogy, I like your approach.

    • @adhishmalviya2408
      @adhishmalviya2408 4 года назад +1

      nice yaar maza aagya lund khada kardiya bc

  • @tarmicle-rowing-3
    @tarmicle-rowing-3 6 лет назад +3

    For windows user: be sure to allow docker to share your drive with guests vm:
    right click on your docker icon into the toolbar -> setting -> shared drives -> check the drive you want to share.
    To refer your current working directory (pwd) use *${pwd}* instead of *$(pwd)* (tested on PowerShell)
    Thanks Brad, awesome job as always

    • @getmaxeddd
      @getmaxeddd 5 лет назад

      thanks man! this comment helped me big time. And yea, it didn't work in gitbash, only PowerShell

  • @philr4665
    @philr4665 5 лет назад +15

    Best Docker intro I've seen yet. I've been trying to hit the ground running implementing Docker, but realised I needed to get a better understating of it. This video hit the spot. THANKS!

  • @greddee
    @greddee 6 лет назад +4

    You're the man Brad. It's so inspiring to see you keep up to date with tech whilst being an awesome teacher as well. Since I'm a student you're the only one I'm currently a patron to and I'm feeling great when I see that monthly transaction to you, knowing that by helping you, you're helping me and hundreds of thousands of other programming students. You're a true source of inpiration!

  • @Skaxarrat
    @Skaxarrat 5 лет назад +1

    I'm a windows 10 user and it took me around 1 hour to mount an image. Thanks to the help of the comments here and forums. This is what you need to do:
    Go to Docker settings -> General. Check Expose Daemon on tcp....
    Go to Shared Drivers and check your drive(s) you want to share. Sometimes you check and it unchecks back. Check it once and even it seems unchecked, reboot Docker. That might help
    Instead of $(pwd), use /c/...your route instead. For example, I typed this:
    C:\Users\Void\Desktop\Codi\Docker>docker container run -d -p 8080:80 -v /c/Users/Void/Desktop/Codi/Docker:/usr/share/nginx/html --name nginx-website2 nginx
    And now it works.

  • @mikebailey783
    @mikebailey783 6 лет назад +3

    @Traversy Media - This video is brilliant; you've made the setup of Docker so much clearer than just about all of the tutorials/walkthroughs I'd previously tried. - I'd just about given up due to other pressing matters, but you've been able to cut straight to the quick, allowing me to get going with it in a practical setting. Thank you Brad!

  • @michaelsinoplis8938
    @michaelsinoplis8938 4 года назад +81

    For anyone wondering, the equivalent of '$(pwd)' on windows cmd is '%cd%' .

    • @curtbryan4620
      @curtbryan4620 4 года назад +15

      For windows users using powershell, you can replace '$(pwd)' with '${PWD}'

    • @billwindsor4224
      @billwindsor4224 4 года назад +1

      Thank you both for this!

    • @pragueexpat5106
      @pragueexpat5106 4 года назад +1

      %cd% is not working, just cd is working

    • @oflanagain
      @oflanagain 4 года назад

      %cd% worked for me, thank you

    • @curtbryan4620
      @curtbryan4620 4 года назад +2

      @@pragueexpat5106 For windows users using powershell, you can replace '$(pwd)' with '${PWD}'

  • @mikequinn
    @mikequinn 6 лет назад

    You don't need to keep puttng "container" or "image" in your docker commands. i.e. docker run is only applicable to containers, as is stop/start etc.
    "docker rm" is only applicable to containers, you want to remove an image then "docker rmi "
    Less typing is better

  • @kaikailele
    @kaikailele 6 лет назад +4

    Dear Brad, I have watched a number of videos on the use of containers and couldn't fully understand the need and advantages of using them. But the first 3 minutes of this video totally enlightened me. Thanks so much for the simple and clear explanation!

  • @theosky7162
    @theosky7162 4 года назад +1

    I've watched at least a dozen intro Docker videos, and this is by far the best because you take the time to explain every command as you go! Perhaps counter-intuitive, but seeing the mistakes you make and how you fix them is also excellent. Thanks! You get my thumbs up, and subscription.

  • @hambaghini
    @hambaghini 6 лет назад +73

    This is awesome! Would love to see an Exploring Kubernetes as well!

  • @marcus.edmondson
    @marcus.edmondson 5 лет назад +1

    Your tutorials are by far the easiest to follow and actually understand! Thank you!

  • @MattKnowsTech
    @MattKnowsTech 6 лет назад +6

    Until now, I really didn't understand the purpose of docker. After watching this video, it makes so much more sense. So I assume this is a very easy way of deploying applications to the internet such as a digital ocean droplet. Instead of using digital ocean one click installs and installing a bunch of crap, you can just pull your image from your dockerhub profile. I can also see how this can help with Wordpress migration, as that can be a bit tricky.

  • @mayank_upadhyay_19
    @mayank_upadhyay_19 4 года назад +1

    To follow this tutorial, I had to go through a lot of work.
    I had to update my windows 10 home to latest version (never updated my windows 10 for last 3 years). Took 5 hours.
    Then I had to convert it to the pro version of windows 10.
    And also, fix some of the inconsistencies that arised with my already installed software. (basically docker will work without it)
    After doing all this, I say that it was one of the turning points where you push the boundaries and enter into a different league of development.
    Edit: ***all the thanks to this video***

  • @kcirnitram1958
    @kcirnitram1958 6 лет назад

    I have been using Docker for a few months now and I just wish I would have had this video available when I stated. Your presentation style is absolutely the outstanding, there is no pretense just practical information.

  • @alexyap4686
    @alexyap4686 5 лет назад

    you have a gift, i must've read countless articles on docker but have never fully grasped the idea until your video, thank you so much for this

  • @L84PA-T
    @L84PA-T 3 месяца назад

    A hands-on tutorial that's easy to follow. Thank you!

  • @Super_Cool_Guy
    @Super_Cool_Guy 6 лет назад +4

    *Brad ! i am so happy you are showing us Dockers, i have been waiting for videos from you on this for some time.... thanks man ! i hope you will continue this docker series and hopefully cover **_kubernetes_** as well !*

  • @fizzdevdesigns5699
    @fizzdevdesigns5699 2 года назад +1

    As before, very clear and straight-to-the-point-while-complete explanations on a subject that might appear mysterious to a beginner (like me!). Thank you so much for offering this treasure trove of tutorials on your channel. Great Content!

  • @MrLarryQ
    @MrLarryQ 6 лет назад +3

    Tremendous stuff Brad. If you're doing a third or fourth video, I'd recommend exploring creating a docker network and then a swarm, since in my experience that's where most people get tripped up-- trying to make this stuff production-ready. I'd be less concerned about Kubernetes at this point IMO, just focus on a 100% 'pure' docker solution.

    • @johnnydriesen7575
      @johnnydriesen7575 5 лет назад

      Yeah, a little 'swarm' example would be welcome....

  • @bishnubasyal5861
    @bishnubasyal5861 2 года назад

    Best docker introduction video I have watched sor far.

  • @kerimtim
    @kerimtim Год назад

    22:48 Yes. This is what I was looking to know. Thanks again Brad.

  • @eudaimona
    @eudaimona 4 года назад

    You make some of the best tutorials in the entirety of tech youtube. You always give me just enough information to hit the ground running. Love it!

  • @dakshsagar2839
    @dakshsagar2839 6 лет назад +42

    Suggestion for a future course: Microservices architecture with node

    • @kamalyadav3567
      @kamalyadav3567 6 лет назад +2

      what are microservices?

    • @russiainvadedukraine2006
      @russiainvadedukraine2006 5 лет назад +4

      @@kamalyadav3567 amazon has a lot of microservices for building your app internal arcitecture. You can combine them to create your app. for example you can choose database, voice recognition service and combine them in your node.js or python app

  • @jackblack2615
    @jackblack2615 5 лет назад

    I have been following this channel for a while, and today I can not thank you enough for your explanation on docker. You just helped me survive my cs program.

  • @jacobwilsh8517
    @jacobwilsh8517 3 года назад

    This was incredibly helpful and valuable, thank you. I may keep you on x2 speed and pause to google questions you answer 2 minutes later but you're the best in the biz. I couldn't even figure out how to phrase a google question of editing files in a docker and I didn't get any results, then I gave up and resumed your vid and you're like "I'm sure you guys are wondering how to edit files in the docker, you can actually bash in".

  • @ononaoyaa
    @ononaoyaa 6 лет назад +4

    Finally a Docker tutorial from Brad :D Thank you!

  • @srikantprasad6711
    @srikantprasad6711 4 года назад

    Thanks for this type of video. There are not such types of videos in RUclips.

  • @MrWilde
    @MrWilde 6 лет назад +21

    Yes I have been waiting for this one, thanks Brad.

  • @dualvideoviralguytalksincar
    @dualvideoviralguytalksincar 2 года назад

    Again coming to you!
    Happy to start again and again

  • @Alessandro-nq3tm
    @Alessandro-nq3tm 6 лет назад +6

    You're a lifesaver , that's what you are Brad!!

  • @empuraan4710
    @empuraan4710 2 года назад

    Got enough from this tutorial and the comments below to get stuff from work up and running ... thanks !

  • @ahmedboutaraa8771
    @ahmedboutaraa8771 4 года назад +1

    king of web-dev

  • @ahmedmusawir
    @ahmedmusawir 6 лет назад +2

    THANKYOU! THANKYOU! THANKYOU!!! I have been waiting for this ... heck, I even emailed you about this a month ago ... can't believe it's here ... couldn't have come at a better time for me!!! I would give this 1 million thumbs ups if I could. U da BEST Brad!!! Would like to see a React App deployed in Nginx using Docker with Express and Mongo backend and deployed on Zeit/now ... cuz this is a free platform. Plz spoil us ... (just an FYI, bought all your courses on Udemy and if you drop a Docker/React course on Udemy, I'll be the first one to buy!!) ... Thanx again. God bless you bro!!

  • @SolomonKahsai
    @SolomonKahsai 5 лет назад

    Bless you my man!!! you did a much better job than most who claim to be teachers of docker. thank you!!!!!!!

  • @chandikalakshan468
    @chandikalakshan468 2 года назад

    I'm following this in 2022. Thank you Brad.

  • @user-rr9pt9ds3i
    @user-rr9pt9ds3i 5 лет назад +4

    Thanks for the great video and tutorial! I'd say keep up with the tutorials - you have a gift for teaching in my honest opinion.

  • @toyinatofarati5512
    @toyinatofarati5512 6 лет назад

    Traversy Media a blessing to our generation

  • @prafullaraichurkar4369
    @prafullaraichurkar4369 4 года назад +9

    new syntax to learn everything you need in development :

  • @Leoninmiami
    @Leoninmiami 5 лет назад +1

    good stuff! you have a good voice and cadence for these instructional videos. I can listen to you all day.

  • @CorporalPoon
    @CorporalPoon 5 лет назад +7

    For windows you can use %cd%: instead of $(pwd)

    • @absurdityabounds757
      @absurdityabounds757 5 лет назад +7

      Thanks for this. I had to use cd with out the surrounding %'s so it was: docker container run -d -p 8080:80 -v cd:/usr/share/nginx/html --name nginx-website nginx

    • @SalemGTV
      @SalemGTV 5 лет назад +1

      lmfao i knew the comments would be a save !

    • @SalemGTV
      @SalemGTV 5 лет назад

      i was trying (C:) :P
      update: it actually works with just "$c:/.... " instead of "$(pwd)/..."

    • @christianangelomsulit3759
      @christianangelomsulit3759 5 лет назад

      How about for linux? (pwd)?

  • @slipperyfish1234
    @slipperyfish1234 6 лет назад +2

    Again, another insanely good tutorial! Would love to see how this set up would work on aws EC2

  • @kerimtim
    @kerimtim Год назад

    Brad. Your videos are very helpful. I like when you put a link to gist files.

  • @RolandoEscalona
    @RolandoEscalona 6 лет назад

    I just started working with Docker and you somehow bring this to my life, THANK YOU SO MUCH!

  • @Skaxarrat
    @Skaxarrat 5 лет назад

    To remove all containers in a Windows machine (as showed at 23:50):
    for /F %i in ('docker ps -qa') do docker rm %i -f

  • @Henkboom1612
    @Henkboom1612 2 года назад

    This is an excellent tutorial, thank you so much for making this. Before this I had only a very vague idea as to what Docker is; I always just used VM's to do what I needed to do, but now I can see why people prefer Docker over VM's.

  • @juanpaul6141
    @juanpaul6141 6 лет назад

    Brad you never cease to amaze me with the content you generate.

  • @lbp003
    @lbp003 2 года назад

    Thank you very much! You showed that everything that I confused to understand these days

  • @Yiosho
    @Yiosho 5 лет назад

    For those of you that are using the Docker Toolbox (I'm using Windows 10 Home) this is the code you have to use to map to your local folder:
    $ docker container run -d -p 80:80 -v /$(pwd):/usr/share/nginx/html --name nginx-website nginx
    (obviously copy after the $ that indicates a command line command).
    I had this problem when I tried it and found the solution in stackoverflow, so I bring it to you here, happy coding!

  • @_marcinrakowski
    @_marcinrakowski 5 лет назад

    Brad, I get so informed from your videos here and on Udemy. you’re a great teacher.

  • @amoghphadke
    @amoghphadke 6 лет назад

    I can't thank you enough, your bootstrap and JS courses have helped me tremendously. Lucky to have a person like you, thanks Brad.

  • @md.shariarkabir7350
    @md.shariarkabir7350 4 года назад

    i know here i get the best teacher for tech. thank brad

  • @pythoniccypress6715
    @pythoniccypress6715 6 лет назад +4

    Amazing tutorial. Btw, I do see the command you were trying to find for Windows 25:13 lol.. I have a question though, when will you use virtual machine instead of docker? Is it when you need to have absolute isolated kernel to ensure security or low-level configuration or something?

  • @lemonplz
    @lemonplz 6 лет назад +11

    Hey Brad loving this. Can you please do a video on kubernetes?

  • @EmanueleDB
    @EmanueleDB 4 года назад +1

    On MacOs also you need to put the quotes around $(pwd) otherwise it will give an error: docker run -d -p 8080:80 -v "$(pwd)":/usr/share/nginx/html --name nginx-website nginx

  • @iiisaac1312
    @iiisaac1312 4 года назад

    at 26:00 note for people on centos, you must append a :z or :Z to the end of your volume, otherwise selinux will kick in and you'll get access denied 403
    -v $(pwd):/usr/share/nginx/html:Z

  • @munapadhi8723
    @munapadhi8723 4 года назад

    Hi Brad,
    Please make video for kubernet as well. This docker tutorial is awesome. You are the best teacher for my life ever.
    Thanks for your hard work

  • @moeinsamani1467
    @moeinsamani1467 10 месяцев назад

    Thank you Brad. I have nothing to say, I just say you made my day:)

  • @iamtolonly
    @iamtolonly 6 лет назад +1

    hi bard thank you for all your work i just wanna say i was waiting for this course a long time ago all thanks to you man
    من اروع الاشخاص الي تقدر تتعلم منه اشياء كثيره شرح مبسط وتصل المعلومات بكل سهوله شكرا bard

  • @TheGreatDaniad
    @TheGreatDaniad 4 года назад

    You are the best instructor. Thanks.

  • @vatsalyasinghi438
    @vatsalyasinghi438 6 лет назад +2

    Amazing tutorial sir .. Can you please do a similar video on jenkins and devops . Thank you :)

  • @mayank_upadhyay_19
    @mayank_upadhyay_19 4 года назад +1

    Amazing video!

  • @doncorleone3901
    @doncorleone3901 5 лет назад

    Brad Traversy is the absolute best

  • @tjtechi4448
    @tjtechi4448 6 лет назад +3

    Seems I happen to view this first. Cool cool. I didn't know nothing about docker but yeah Brad, well done sir. I appreciate you a lot and your work.

  • @AbhishekNigam
    @AbhishekNigam 5 лет назад +1

    Thank you so much!! You made docker really easy

  • @guylemay1471
    @guylemay1471 5 лет назад

    Two days bashing my head against the keyboard over this video, but in the end it was well worth it - thanks!

  • @dzengiztafa7964
    @dzengiztafa7964 5 лет назад +1

    Another awesome video by Traversy Media!
    Thank your for sharing your knowledge about this. Best tutorial I found about docker using some hands-on commands & examples

  • @monteymon8
    @monteymon8 6 лет назад +3

    Just the best explanation! I’ve finally got comfortable with docker, many thanks

  • @jaroslawkret
    @jaroslawkret 6 лет назад +3

    Brad, following your tutorial when i type 'docker ps' i can see nginx and httpd running on ports 8080 and 8081 exactly like in your vid but i cannot see them running in my Chrome browser (localhost:8080/8010 gets me ERR_CONNECTION_REFUSED) any idea what could've gone wrong ?:(

  • @alecmather
    @alecmather 3 года назад

    Brad just doing gods work, once again...
    Btw, great analogy of difference between images and containers:
    Images are to containers as classes are to class instances
    Only helpful if you understand that programming concept lol, but the idea is there

  • @curtbryan4620
    @curtbryan4620 4 года назад

    For windows users using powershell, you can replace '$(pwd)' with '${PWD}'

  • @pdeswardt
    @pdeswardt 6 лет назад

    I just got schooled - thanks - now i understand docker so much better!

  • @shashanksshetty9870
    @shashanksshetty9870 6 лет назад +6

    Awesome i wanted this badly

  • @rabrahierpa
    @rabrahierpa 6 лет назад

    Thank you so much Brad. I have been waiting for you to explain docker as simple as possible.

  • @vladmusteata4250
    @vladmusteata4250 4 года назад

    If anyone has problems running: docker container run -it -p 80:80 nginx
    Such as: Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.
    ERRO[0017] error waiting for container: context canceled
    It means that you are already using the port 80, for me it helped closing the apache2(in ubuntu linux, service apache2 stop)

  • @jasminem360
    @jasminem360 5 лет назад +1

    “hopefully that makes sense !” haha, i love the way you explain things, make sense for me :P

  • @HarshKapadia
    @HarshKapadia 4 года назад

    Just FYI, Docker Desktop is now available on Win 10 Home edition with the 2004 version update. It needs WSL2 as well and the documentation for that is pretty straightforward.

  • @evilflowx
    @evilflowx 4 года назад

    Thank you very much for this video! This is one of the most informative containers videos that I've come across yet.

  • @e4r281
    @e4r281 6 лет назад

    I was too lazy to learn docker by myself. Thanks Traversy Media for teaching me :)

  • @sreid70
    @sreid70 5 лет назад

    Awesome! Really like the way you explain things. Nice to see the concepts demonstrated without using some over complicated example.

  • @NabhoneelMajumdar
    @NabhoneelMajumdar 6 лет назад

    This is insanely helpful! I had NO idea about what Docker was or why it existed and now it feels like my entire life as a developer was a lie :P

  • @MrVelyx
    @MrVelyx 4 года назад

    First time i understood Docker. Nice Job man

  • @raymondmichael4987
    @raymondmichael4987 6 лет назад

    I know nothing about Docker apart from just hearing about how cool it is; thanks dude, now I'll get my fill

  • @dmurphydrtc
    @dmurphydrtc 6 лет назад

    Thanks for taking the time to share your knowledge and time. Love your work.

  • @deathstalker8509
    @deathstalker8509 4 года назад

    You are really good at teaching 😀

  • @jonatasoliveira500
    @jonatasoliveira500 3 года назад

    The best content I've found for Docker! Thanks!!

  • @raulcubitto
    @raulcubitto 5 лет назад

    Amazing tutorial, easy to understand and to the point.

  • @phillipspencer1321
    @phillipspencer1321 5 лет назад

    Thumbs up for learning something at the same time.

  • @aio6257
    @aio6257 6 лет назад

    I wish you uploaded this video a several months ago when I was in a great need of learning docker. I lost my freelance task Because there was no good resource on RUclips about it. Anyways you're the best, trust me.

  • @konstantychodkowski7197
    @konstantychodkowski7197 6 лет назад +2

    For those who are looking for how to mount local directory with docker on Windows, I guess this is the right answer: stackoverflow.com/questions/41485217/mount-current-directory-as-a-volume-in-docker-on-windows-10

  • @nicklesseos
    @nicklesseos 6 лет назад

    use powershell if you have trouble with cmder or gitbash and enable docker access to your drives on windows

  • @MrSaurabhDeva
    @MrSaurabhDeva 3 года назад

    You are awesome Brad, I like your videos and it is fantastic one for the docker initial understanding, you nicely explained every steps for beginner who is starting Docker.

  • @albertoarielarce2982
    @albertoarielarce2982 3 года назад

    You are the best in your job, thank!

  • @nishantkumar6960
    @nishantkumar6960 4 года назад

    Thank You, Mr. Angel

  • @olivert.7192
    @olivert.7192 6 лет назад

    You're a great teacher and explainer, always enjoy your videos. Keep it up

  • @JoeBob79569
    @JoeBob79569 6 лет назад

    I just installed Docker last night, and you've a tutorial uploaded for me just in time.. thanks! :-)

  • @oksanaserhiivna2634
    @oksanaserhiivna2634 5 лет назад +1

    Thanks Brad for doing all this. :)

  • @ahmedsoliman4015
    @ahmedsoliman4015 5 лет назад

    for Windows you can use "docker container run -d --name nginx-website -p 8080:80 -v /${PWD}:/usr/share/nginx/html nginx"