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
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)
Traversy Media Django
Wordpress laravel
Lamp
Laravel & Django
LAMP with Port forwarding and configuration
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
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)
"Unless it is your boss lol" :))))
You simply made my day sir! :D
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 =)
Please do that video, Transversy Media. Looking forward to it. Coz every new tech keeps making head explode. Thanks. :D
Looking forward for that video Brad
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.
tyty
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.
Nice analogy!
Good analogy, I like your approach.
nice yaar maza aagya lund khada kardiya bc
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
thanks man! this comment helped me big time. And yea, it didn't work in gitbash, only PowerShell
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!
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!
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.
Thanks man! Worked for me also!
@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!
For anyone wondering, the equivalent of '$(pwd)' on windows cmd is '%cd%' .
For windows users using powershell, you can replace '$(pwd)' with '${PWD}'
Thank you both for this!
%cd% is not working, just cd is working
%cd% worked for me, thank you
@@pragueexpat5106 For windows users using powershell, you can replace '$(pwd)' with '${PWD}'
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
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!
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.
This is awesome! Would love to see an Exploring Kubernetes as well!
yep logical next step
@@kzakaria91 highly agree.
Your tutorials are by far the easiest to follow and actually understand! Thank you!
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.
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***
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.
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
A hands-on tutorial that's easy to follow. Thank you!
*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 !*
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!
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.
Yeah, a little 'swarm' example would be welcome....
Best docker introduction video I have watched sor far.
22:48 Yes. This is what I was looking to know. Thanks again Brad.
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!
Suggestion for a future course: Microservices architecture with node
what are microservices?
@@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
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.
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".
Finally a Docker tutorial from Brad :D Thank you!
Thanks for this type of video. There are not such types of videos in RUclips.
Yes I have been waiting for this one, thanks Brad.
Again coming to you!
Happy to start again and again
You're a lifesaver , that's what you are Brad!!
Got enough from this tutorial and the comments below to get stuff from work up and running ... thanks !
king of web-dev
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!!
Bless you my man!!! you did a much better job than most who claim to be teachers of docker. thank you!!!!!!!
I'm following this in 2022. Thank you Brad.
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.
Traversy Media a blessing to our generation
new syntax to learn everything you need in development :
Except kubernetes :(
good stuff! you have a good voice and cadence for these instructional videos. I can listen to you all day.
For windows you can use %cd%: instead of $(pwd)
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
lmfao i knew the comments would be a save !
i was trying (C:) :P
update: it actually works with just "$c:/.... " instead of "$(pwd)/..."
How about for linux? (pwd)?
Again, another insanely good tutorial! Would love to see how this set up would work on aws EC2
omg yeah
Brad. Your videos are very helpful. I like when you put a link to gist files.
I just started working with Docker and you somehow bring this to my life, THANK YOU SO MUCH!
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
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.
Brad you never cease to amaze me with the content you generate.
Thank you very much! You showed that everything that I confused to understand these days
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!
Brad, I get so informed from your videos here and on Udemy. you’re a great teacher.
I can't thank you enough, your bootstrap and JS courses have helped me tremendously. Lucky to have a person like you, thanks Brad.
i know here i get the best teacher for tech. thank brad
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?
Hey Brad loving this. Can you please do a video on kubernetes?
What the hell is Kubernetes?
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
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
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
Thank you Brad. I have nothing to say, I just say you made my day:)
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
You are the best instructor. Thanks.
Amazing tutorial sir .. Can you please do a similar video on jenkins and devops . Thank you :)
Amazing video!
Brad Traversy is the absolute best
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.
Thanks :)
Thank you so much!! You made docker really easy
Two days bashing my head against the keyboard over this video, but in the end it was well worth it - thanks!
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
Just the best explanation! I’ve finally got comfortable with docker, many thanks
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 ?:(
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
For windows users using powershell, you can replace '$(pwd)' with '${PWD}'
I just got schooled - thanks - now i understand docker so much better!
Awesome i wanted this badly
You mean "Bradly"?
Thank you so much Brad. I have been waiting for you to explain docker as simple as possible.
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)
“hopefully that makes sense !” haha, i love the way you explain things, make sense for me :P
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.
Thank you very much for this video! This is one of the most informative containers videos that I've come across yet.
I was too lazy to learn docker by myself. Thanks Traversy Media for teaching me :)
Awesome! Really like the way you explain things. Nice to see the concepts demonstrated without using some over complicated example.
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
First time i understood Docker. Nice Job man
I know nothing about Docker apart from just hearing about how cool it is; thanks dude, now I'll get my fill
Thanks for taking the time to share your knowledge and time. Love your work.
You are really good at teaching 😀
The best content I've found for Docker! Thanks!!
Amazing tutorial, easy to understand and to the point.
Thumbs up for learning something at the same time.
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.
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
use powershell if you have trouble with cmder or gitbash and enable docker access to your drives on windows
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.
You are the best in your job, thank!
Thank You, Mr. Angel
You're a great teacher and explainer, always enjoy your videos. Keep it up
I just installed Docker last night, and you've a tutorial uploaded for me just in time.. thanks! :-)
Thanks Brad for doing all this. :)
for Windows you can use "docker container run -d --name nginx-website -p 8080:80 -v /${PWD}:/usr/share/nginx/html nginx"