Docker Networking Crash Course

Sdílet
Vložit
  • čas přidán 7. 06. 2024
  • Docker is a container management engine. In this video I explore the networking side of docker, how to create network, connect containers to a network and connect two networks together.
    0:00 Intro
    0:30 Spin up a simple container
    5:15 Build a custom image
    9:00 The Bridge network
    13:30 Why can’t I ping hostnames in Bridge network
    18:00 Create a Custom network
    30:00 Create two networks
    39:00 Connect the two networks
    Scripts
    github.com/hnasr/javascript_p...
    Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
    network.husseinnasser.com
    Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
    database.husseinnasser.com
    Introduction to NGINX (link redirects to udemy with coupon)
    nginx.husseinnasser.com
    Python on the Backend (link redirects to udemy with coupon)
    python.husseinnasser.com
    Become a Member on CZcams
    / @hnasr
    Buy me a coffee if you liked this
    www.buymeacoffee.com/hnasr
    Arabic Software Engineering Channel
    / @husseinnasser
    🔥 Members Only Content
    • Members-only videos
    🏭 Backend Engineering Videos in Order
    backend.husseinnasser.com
    💾 Database Engineering Videos
    • Database Engineering
    🎙️Listen to the Backend Engineering Podcast
    husseinnasser.com/podcast
    Gears and tools used on the Channel (affiliates)
    🖼️ Slides and Thumbnail Design
    Canva
    partner.canva.com/c/2766475/6...
    Stay Awesome,
    Hussein
  • Věda a technologie

Komentáře • 112

  • @hnasr
    @hnasr  Před rokem +6

    Learn the fundamentals of network engineering, get my udemy course click the link for a discount coupon
    network.husseinnasser.com

    • @ozoniuss1463
      @ozoniuss1463 Před rokem +5

      When I first saw that this course was from you, I bought it instantly from a crowded bus on my phone. I didn't even search for other alternatives because I think we are very like-minded when it comes to computer science. I feel like there aren't many developers like you who are just curios about how things work and want to have a clear understanding of the technologies they're using. I just hate when I have to quickly learn some new technology and not have the time to study it; only when things break you realize how little you know about it.
      I barely started section 2 and already love it. I'll definitely make sure to leave a review when I'm done.

    • @hnasr
      @hnasr  Před rokem +3

      @@ozoniuss1463 thank you! And I agree learning a new tech is not hard, understanding how actually it works is what interests me.

  • @shashaanklearns
    @shashaanklearns Před rokem +157

    Hey, Hussein. Can you also make a video on k8s architecture and it's networking?

  • @yashlearnscode5502
    @yashlearnscode5502 Před rokem +1

    Hussein might be the best teacher I've come across. Whenever he speaks, I learn something new every damn time. +1 to all the people commenting for the K8s series, I'd even pay for a course on K8s if it was exclusively taught by you.

  • @razorr1920
    @razorr1920 Před rokem

    One of my most cherished CZcamsrs. Dude you are awesome for all that you teach the community.

  • @randxalthor
    @randxalthor Před rokem

    Oh this is excellent. Going on my watchlist for work for Monday!
    Thank you for providing such practical and high quality content. You're providing such strong backbone references for the backend developer knowledge base.

  • @A.K_1998
    @A.K_1998 Před 3 měsíci +1

    I've recently learned more about docker and worked with docker compose and network but I had this question that how could two container in different network communicate to eachother and I couldn't figure it out until I've seen your video and finally I got it. you're really cool and the concepts that you explain are really the hard things that one could think but not understand easily. Excellent work. please make more videos like this. Thank you Hussein Nasser!🙏

  • @prathamsinghal5261
    @prathamsinghal5261 Před rokem +4

    First thing first.. I have followed your tutorial command by command and it's very amazing to know the things by having hands on.
    Secondly, please continue this as the series/playlist and also please include K8s Networking as well(I know it will take huge amount of efforts but that will be really appreciable).

  • @RazoBeckett.
    @RazoBeckett. Před 5 měsíci

    The fun while exampling that means he really enjoys and loves what he do .. really appreciate man great video even after 1 year.

  • @aba-nascu
    @aba-nascu Před rokem

    Thank you Sir! Keep the awesome work. This almost 50 minutes video went so fast, didn't even blink :-)

  • @ameedjamous8304
    @ameedjamous8304 Před rokem

    Great stuff Hussein. Thanks for putting this video together. Looking forward to your next docker video.

  • @kalmabrooks978
    @kalmabrooks978 Před 11 měsíci

    Enjoyed every min of this video!!! This was FIRE 🔥, especially how you narrated the vid was funny. Kept me engaged 👌🏾

  • @daedwill
    @daedwill Před rokem

    Love your videos Hussein, you tackle everything from a first principle perspective.

  • @belalkazmi
    @belalkazmi Před rokem

    Hussein, I am so happy that I found your channel. I listen to your podcast while I go for walking. Got your udemy course as well. Hope to get more such vids from you. You are a Genius ❤

  • @jasonjente6793
    @jasonjente6793 Před rokem

    Really enjoyable content and very high quality, many things got clarified along the way! Thanks for the clarifications!

  • @sevensolutions77
    @sevensolutions77 Před 9 měsíci

    Thx Hussein, this is one of the best Docker Networking videos 👍

  • @christianibiri
    @christianibiri Před rokem

    This video is awesome! very very detailed explanation about how container network works.

  • @empuraan4710
    @empuraan4710 Před rokem

    300k subs... congrats and keep going HN !

  • @nshukla6
    @nshukla6 Před rokem

    One of the best video, a tiny error in image diagram where you swap the network frontend from backend and vice-versa

  • @vivarantx
    @vivarantx Před rokem

    I just found this amazing channel, you are impressive. Subscribed!

  • @thePribs
    @thePribs Před rokem

    This was amazing, really enjoyed the tutorial

  • @bobhutchinson3638
    @bobhutchinson3638 Před měsícem

    Great explanation in addition for networking articles

  • @galeyal2
    @galeyal2 Před rokem

    Awesome video !
    very nice and simple to understand !

  • @shazzad
    @shazzad Před 9 měsíci

    Thank you very much for making the video. Learned very important thing about networking.

  • @kirglow4639
    @kirglow4639 Před rokem

    Your videos are a treasure trove. Thank you

  • @HarshKapadia
    @HarshKapadia Před rokem

    Awesome video, Hussein! Thank you so much!

  • @pixelbogpixxelbog2090
    @pixelbogpixxelbog2090 Před rokem +1

    1010/1010 Video. Really amazing work :)

  • @BinaryIgor
    @BinaryIgor Před rokem

    Love these deeep dives, there are so rare on youtube ;)

  • @adam8685
    @adam8685 Před rokem

    Awesome video Hussein. Would love to see some content for Docker Compose too, as that's mainly how I work with Docker

  • @anmolbhatia05
    @anmolbhatia05 Před rokem +1

    Dude, take a bow!

  • @hurlimanjumamuratova2425
    @hurlimanjumamuratova2425 Před 7 měsíci

    thank you so much, really enjoyed☺

  • @kiranbhanushali7069
    @kiranbhanushali7069 Před rokem

    best video for docker networking

  • @MyDiscovery2021
    @MyDiscovery2021 Před 11 měsíci

    This is a really excellent video. thank you

  • @AshenafiDemisse
    @AshenafiDemisse Před rokem

    thanks Hussein 👍 it's awesome 👌

  • @ayuobmousa6589
    @ayuobmousa6589 Před rokem

    Awesome Hussein

  • @FelipeMontecristo
    @FelipeMontecristo Před 7 dny

    Great!!! thank you very much for the tutorial

  • @zuggrr
    @zuggrr Před rokem

    I learned so much ! thanks

  • @dhavalsuthar1
    @dhavalsuthar1 Před rokem +3

    Awesome 🥰💫

  • @tesla1772
    @tesla1772 Před rokem +12

    Awesome video as usual. One request, can you also add links to artice or documentation or basically what method you follwed to learn what you teach so that we will also get some idea on how to start learning these concepts on our own

  • @shaheerzaman620
    @shaheerzaman620 Před rokem

    this was such a nice tutorial

  • @chris0628
    @chris0628 Před rokem

    Awesome content 👍🏽

  • @JohnZakaria
    @JohnZakaria Před rokem +3

    For everyone looking at the Dockerfile.
    You should avoid creating too many stages within your docker file to keep your image small.
    Each command creates an image that you can explore (i.e) you can even intermediate images that lead to the creation of your docker image (like visiting your image after installing iproute2).

    • @prathamsinghal5261
      @prathamsinghal5261 Před rokem +3

      Of course we can do that! But Best practices can be followed at the production level but at the tutorial level beginners also might watch this stuff do for the simplicity he did that (I think)

  • @matiasbpg
    @matiasbpg Před rokem

    great tutorial! I've learn a lot of networking watching your videos, thank you. About the DNS, is it possible to add an IP route rule to use the gate way container as the DNS for both S1 and s2?

  • @TheGaneshkumawat
    @TheGaneshkumawat Před rokem

    Man, you are awesome!!!

  • @amrfarrouh
    @amrfarrouh Před rokem

    Awesome, thank you

  • @alwaha4283
    @alwaha4283 Před 10 měsíci

    Good tnx habibi 🙂

  • @devyetii
    @devyetii Před rokem

    1. Again and again, thanks for your always-great content
    2. Isn't the security issue with exposing the BE network to the FE network still there because of using the gateway container? How to mitigate this ?
    3. Looks like your visit to Bahrain added more if the Arabic taste to your accent with all the stressed 'R's. 😂 .. Hope you visit Egypt anytime soon and sure I'll be so happy to meet you 😃
    4. I have very low experience with stuf written in yaml but I find it much easier and cleaner than JSON, why don't you like it ?

  • @darrenhorwitz1860
    @darrenhorwitz1860 Před rokem

    Hey , great tutorial ! Could you please 3xplain how gw container was able to forward the packets without any further configuration on the container ? I understand it has interfaces in both subnets and the rtb changes for s1 and s2 to use gw as gateway for those respective cidr ranges , but I still don't understand how it was able to automatically for the packets ...

  • @ragsbigfella
    @ragsbigfella Před rokem

    fantastic

  • @sadness7897
    @sadness7897 Před rokem

    If you want to know how something works,you need to get your hands dirty. Thanks for the video. I never tried doing something like that, adding more info to my brain. Blessings.

  • @jessysingh7529
    @jessysingh7529 Před rokem

    Hey Hussein - Can you make a video on how to look at the Github code of large open source modules? For ex: If I want to understand how does the get method works under the hood in the node js module, what steps I need to go through and land at the right place.

  • @shyandsy
    @shyandsy Před rokem

    thank u so much

  • @jaswalkiranavtar
    @jaswalkiranavtar Před 6 měsíci

    For propagating dns, you might just have to add the entry of other network's dns server to /etc/resolve.conf to container in first network

  • @elijahhadasevich7907
    @elijahhadasevich7907 Před rokem

    Mr.Hussein, if you happen to have a time could you please make a video or a paid course on how to design and build highload backend architecture and all that kind of stuff? For example how to build architecture which could support 10-50k requests per second, thanks for your work!

  • @kamandejohn7330
    @kamandejohn7330 Před rokem

    Good job Hussein ... do something on k8

  • @fullnaoufal
    @fullnaoufal Před rokem

    Hey Hussein
    Thanks for this content.
    I have a question, why you never gire a comparaison between open source database like postgresql, mysql and property database like sql server, may be I'm wrong ? 😊

  • @vinhlochuynh9480
    @vinhlochuynh9480 Před rokem

    I used ubuntu before and still got confused about networking when using docker in macos. This is very useful

  • @amineabarda4103
    @amineabarda4103 Před rokem

    Thanks

  • @BestPlayer07
    @BestPlayer07 Před rokem

    Hi hussain, could it be possible if we don't create the gw container. But instead we create just the gw network and attach both of these containers s1 and s2 to that network?

  • @mayikx
    @mayikx Před rokem

    Waww new CZcams app

  • @zeeshawnali7187
    @zeeshawnali7187 Před rokem

    Could you cover more cloud technologies from the Big 3 providers?

  • @siddhantchavan1370
    @siddhantchavan1370 Před rokem +1

    3:40
    Docker doesnt spin up a vm. It uses namespaces feature in linux to spin up containers.

  • @markokraljevic1590
    @markokraljevic1590 Před rokem

    can you make video about running virtual router inside docker container and use it to route physical local network? maybe openwrt

  • @39zack
    @39zack Před rokem

    But can you have an isolated network that can't directly connect to the internet through the host bridge but then use another network as gateway?

  • @dasten123
    @dasten123 Před rokem

    is that how docker-compose does it in the background?

  • @fltngmmth
    @fltngmmth Před rokem

    you have to make the network attachable to new containers with the ‘--attachable’ option when you want to add services to an existing external network. And with overlay network options it gives you more flexibility. Especially when networking containers to swarm services.
    Edit: that is if i understand your frustration with restrictive docker. Im a docker shill…

  • @seattledude2022
    @seattledude2022 Před rokem +1

    22:10 The only course that the servers are called "these suckers" 😂

  • @abdulmobeen-developer

    Can you make a video on - Docker & Microservices

  • @AllTypeGaming6596
    @AllTypeGaming6596 Před rokem

    Please make videos on k8s

  • @mnj1
    @mnj1 Před rokem +1

    What actually is the "bridge" in Docker? Is it the same thing conceptually as en.wikipedia.org/wiki/Network_bridge? Does it connect a host to the containers on a level-2 layer of OSI? If so, how does a bridge have an IP address? That Docker bridge sounds more like a router.
    @Hussein, could you explain that?

  • @raedbettaieb
    @raedbettaieb Před rokem

    34:40 that one annoying Mosquito when you trying to sleep

  • @AllenIve3
    @AllenIve3 Před rokem

    What about accessing localhost from a container ? In linux it’s ok but not mac and windows. Can someone explain that ?

  • @engineeranonymous
    @engineeranonymous Před rokem

    As Hussein highlighted in video unlike Mac or Windows, Docker do not run on hypervisor on Linux so on Linux some of command results might change. Its normal.

  • @sadiqali9156
    @sadiqali9156 Před 8 měsíci

    Thanks, Hussain, amazing as always!
    - One thing I'd mention is that I can run apt-get commands by exec the container as root user "sudo docker exec -u 0 -it bash" if you do not want to install them in the Dockerfile.
    - Can you explain how to allowt he container call the localhost, in my case I want the application in my container to interact with API that runs locally in my machine

  • @Samuftie
    @Samuftie Před rokem

    22:42 "I don't know if it stands for interactive terminal. This is how I remember stuff. You're going to see weird stuff." that's funny!

    • @Samuftie
      @Samuftie Před rokem

      25:32 "they can curl each other!... curl each other?"

  • @eduardoromao
    @eduardoromao Před 10 měsíci

    For local develpment I need to allow my host network to know/see and bridge network. How can I configure my network to do that? I use Ubuntu 22.04 and in Ubuntu 20.04 I can do that by default.
    In my case I have a "mybridgenetwork" and have a defined ipam. My containers share this network and each container has a specific IPV4 IP.
    From my host, I configure my hosts file to redirect the containers IP to specific URL (it's a complex environment).
    Now in Ubuntu 22.04 I can't do that 😢
    Someone have a magic trick?

  • @stunning-computer-99
    @stunning-computer-99 Před rokem

    Kubernetes Networking please!

  • @muhammadsubhan8333
    @muhammadsubhan8333 Před 5 měsíci

    + 1

  • @ivandrofly
    @ivandrofly Před rokem

    3:30 Docker0
    37:05 router*

  • @widyguilias3738
    @widyguilias3738 Před rokem

    Can you make video about whatsapp outage, please?

  • @joostvhts
    @joostvhts Před rokem

    Hey, what happened to whatsapp yesterday?

  • @tornado-zex47
    @tornado-zex47 Před 3 měsíci

    back to islam brother

  • @Lokra_
    @Lokra_ Před rokem

    Hahaha what a joke. Run some commands for a week, then make a crash course ahahahahhhahahaha

  • @programminginterviewsprepa7710

    Pleae K8S networking tutorials and general k8s tutorials Save Our Souls Nasser!! ❤😢😢🥺🥺🥹🥹