Docker Compose Tutorial

Поділитися
Вставка
  • Опубліковано 21 бер 2022
  • Learn all about Docker Compose so you can orchestrate your services with confidence!
    - Get the complete Docker course (zero to hero): bit.ly/3sO7Z5H
    - Subscribe for more Docker tutorials like this: goo.gl/6PYaGF
    ⭐️ Want to learn more from me? Check out these links:
    Courses: codewithmosh.com
    Twitter: / moshhamedani
    Facebook: / programmingwithmosh
    Blog: programmingwithmosh.com
    #Docker #DevOps
    Docker is the de facto standard for building, shipping and running applications in a consistent manner. That's why most companies use it and are looking for developers with Docker skills. If you're looking for a career in software or DevOps engineering, you must have Docker on your resume. And not only that, you should know it well and be able to use it to effectively package and deploy your applications.

КОМЕНТАРІ • 429

  • @leahaimovich7221
    @leahaimovich7221 6 місяців тому +15

    thank you!! where is the zip file you mantion in 5:54?

  • @Sarah-zj7ve
    @Sarah-zj7ve 2 роки тому +33

    Just starting my coding journey and found your website and courses by accident. Couldn't be more thankful for what you have put together. You're such a gifted teacher! Learning SO much thanks to you!! :)

    • @edwinchiboko3737
      @edwinchiboko3737 Місяць тому +1

      did you get the zip file?

    • @satadhi
      @satadhi 18 днів тому

      @@edwinchiboko3737 yah dude where is the zip file

  • @harishpalsande9084
    @harishpalsande9084 2 роки тому +3

    I have learned everything from watching your video. You are my teacher
    I watch your video at least once a day. A lot of people are learning because of you
    Thank you very much 🙏

  •  Рік тому +6

    You're the frickin' BEST teacher here, Mosh! Man, if I become a IT teacher one day, I hope I can be like you! You explain everything so clearly, you seem to understand what people need to get something. That comparision you did beetween json and yaml what GOD TIER.
    I bought you Redux course and IT WORTH EVERY CENT!

  • @nothingwithoutthis5021
    @nothingwithoutthis5021 2 роки тому +16

    I really enjoy and appreciate all your work, you make the world better with your courses where you combine all necessary knowledge and tools for programming. I really love programming and, for sure, you made me love it! Peace and Love from Ukraine!❤️

  • @user-rj8yv5nz3f
    @user-rj8yv5nz3f 10 місяців тому

    thank you Mosh for your high quality and amazing tutorials. wish you the best.

  • @RajKumar-ts7fk
    @RajKumar-ts7fk 2 роки тому +53

    Finally the legend is back 😎

    • @programmingwithmosh
      @programmingwithmosh  2 роки тому +15

      Thank you! Please support me by liking and sharing this video. :)

    • @RajKumar-ts7fk
      @RajKumar-ts7fk 2 роки тому +4

      Learning is a continuous process

    • @tanveerahmad5996
      @tanveerahmad5996 2 роки тому +3

      Absolutely mosh!..

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

      Done :-)

    • @Sal-bm4mw
      @Sal-bm4mw 2 роки тому

      @@programmingwithmosh Hello Sir! How can I Unsubscribe Code with Mosh? I've Completed My courses. Thanks a Lot!

  • @bjjblog
    @bjjblog 2 роки тому +57

    0:00 Intro
    0:27 Running Multi-container Apps (intro)
    1:16 Installing Docker Compose
    2:30 Cleaning Up our Workspace (delete containers and images)
    5:39 The Sample Web Application
    8:50 JSON and YAML Formats
    13:00 Creating a Compose File
    21:58 Building Images
    25:38 Starting and Stopping the Application
    27:49 Docker Networking

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

    Superb Mosh-jan. Thank you. I say this without prejudice. Content is fluid, it stops to point out significant landmarks without cluttering, and therefore the duration is also tolerable in this age of millisecond attention spans. I learned a lot and refreshed a lot.

  • @isaacambi1914
    @isaacambi1914 Рік тому +6

    I only appreciate your lectures after going through the ones done by others. This guy is a genius teacher.

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

    I couldn't be more thankful for what you do!

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

    You are AMAMAMAMAZING Mosh.. God Bless you for the free stuff!

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

    This video cleared my doubts, love the content.

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

    You're a life saver Mosh, this is just what I was looking for💯

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

    I like your tuts very much dude. Simple but practical

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

    If you are wondering why the version number is string, it's because version can be something like 3.8.1 which is not a number.

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

    You are the best teacher ever you explain once and I allredy understand.😄😄

  • @kolcha
    @kolcha Місяць тому +3

    at 5:50 you mentioned the zip, there is not zip file link in the video description.

  • @janekschleicher9661
    @janekschleicher9661 Рік тому +16

    Regarding JSON vs YAML: It's not only about performance, but also about validation and security.
    If you, e.g. copy+move some lines from a JSON file to another location, most likely, the JSON will be corrupt and incorrect, and if not, it's very likely, the order didn't matter anywhere. That's good behaviour for anything that mainly computers operate, as such a copy+paste error easily happens while editing (or merging with git), but might not be reviewed by (many) humans, so might be undetected for a long time. In YAML, there is a good chance, randomly moving blocks around, the end result is a different, but still correct YAML. Indeed, that's such a common error, that for bigger projects you usually have to write an own linter for the yaml files checking e.g. if the keys are the expected ones. Regarding security: YAML specification is a bit bigger than XML, so it contains a lot of hard to implement and possible insecure options. That's why many first naive implementation of YAML parsers in programming languages were replaced over time by other parser only implementing a secure subset of YAML. (Or alternatively that's tackled by the custom linters you have to write anyway)
    There are some other subtle problems with YAML, e.g. your question of why you have to put "3.8" in quotes is because otherwise it would be detected as float und depending of whether can be represented in binary internally exactly or only close to it (indeed, 3.8f == 3.7999999523162841796875). The easiest way to enforce consistency is to demand that the version is always a string and not sometimes a string (3.8.0 == "3.8.0"), sometimes a float (3.8 == 3.7999999523162841796875) and sometimes an int (4 == 4).
    There are many more subtle possibilities to misinterpret the unquoted strings: Magic words like true or false are becoming booleans. A minus sign is very often interpreted as list start, several further characters like +, |, also have special meanings and so on. When in doubt, always put your strings into quotes, from a practical standpoint that the system should what we want to say in the yaml, even though readability is reduced.
    That's why, where high predictability is wanted, often enough different formats are used with less surprisings. E.g. HCL for Terraform, Programming languages for Pulumi, AWS CDK, ... or just toml/ini files.
    Anyway, the high readability, easy understanding and universal structure of YAML dominates pretty much every modern stack, so the solution to all the above problems are custom linters and performant YAML parsers (most often with an own subset or dialect).
    BTW, JSONs have disappointing also ambiguities that can even be exploited, e.g. the spec does not tell anything what should happen if a key is duplicated (which value to take). Different parsers handle that differently, and for the right combination, you can pass the validation done by the first parser to then inject some malicious (or just unintended, unwanted) behaviour to the second parser.

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

    Really appreciate your content Mosh!

  • @kywei7485
    @kywei7485 7 місяців тому

    Thank you Mosh, you always make good tutorial!

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

    Thank You Mosh! I'm gonna take your course!

  • @faizanvanekar7882
    @faizanvanekar7882 2 роки тому +7

    It would be great if you could make a course on Devops tools ( Open source tools ) with the CI /CD Pipeline.

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

    Thank You Mosh. This tutorial was great!

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

    Thank you so much for this wonderful tutorial

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

    so proud of You Mosh ! I'm from Iran , Hamedan too. !!

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

    Congrats ! The course is awsome ! Thank you :)

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

    Mosh we are so glad to see you're back

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

    thanks Mosh. as always, great tutorial.

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

    Really great videos , well explained , just awesome !

  • @QuantumFn
    @QuantumFn 2 роки тому +9

    I learned so much from your 6 hours python course .Thank you so much Mosh🙏

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

    Happy to see you brother!! Love from India 😍

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

    thank you so much for shaing your knowledge in an intersting way

  • @potatocoder5090
    @potatocoder5090 10 місяців тому +11

    Hello Mosh! Thank you for making these amazing tutorials. Could you please link the zip file that you are referring to in this video so that we can follow along? Thank you!

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

    This was really helpful. Thank you.

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

    I really enjoy ur videos with great understanding, I want to be a software developer but I don't know which programming language to learn first, and where to start 😶

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

    This was one hell of a great video. You have a great teaching style. You are VERY clear in your explanations. And best of all, your screen captures are MOBILE-FRIENDLY. This video was missing the 1 thing I came looking for, but I am glad I watched the whole thing. Liked. Subscribed. Will look over your courses and purchase any that are remotely relevant to my needs. ☮❤🌈
    PS: What I needed was how to do a "reverse port map/access". That is, I need initiate "from contain to host", instead of the "from host to container" that is explained EVERYWHERE. I have since learned this is done via `docker run --add-host=host.docker.internal:host-gateway` or in docker-compose.yaml `extra_hosts: ["host.docker.internal:host-gateway"]` Then [for example] your container can access the CUPS printer on your host machine via port: 631 on host: host.docker.internal

  • @myominhann138
    @myominhann138 11 місяців тому

    Great explained. Thank you so much.

  • @user-rg6qw2mi1d
    @user-rg6qw2mi1d Рік тому

    good stuff. thank you. now the world needs your take on svelte!

  • @alienmars1
    @alienmars1 10 місяців тому

    Thank you for this tutorial, I was having problems until I saw your video thank you very much

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

    what a great content! so grateful to you

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

    Really really it's great to see u on live ❤️❤️

  • @chandrashekharkulkarni2900
    @chandrashekharkulkarni2900 Рік тому +5

    Where is the Zip file? As stated in this video at 5:47...

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

    Being a metalhead for decades. I just found my new favorite person and that guy's name is Mosh! \M/

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

    Great tutorial , that helped me well
    Thanks

  • @EruaMedia
    @EruaMedia 2 роки тому +2

    my king mosh i love you so so much, you taught me how to be the best programmer big love from africa Ethiopia.

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

      Thank you! Please support me by liking and sharing this video. :)

    • @atharvbudhe6756
      @atharvbudhe6756 Рік тому +2

      @@programmingwithmosh Where is the Zip file? 5:56 ????

  • @andrewcox4324
    @andrewcox4324 Рік тому +8

    just wondering where the zip file is located??

  • @MrWeb-dev
    @MrWeb-dev Рік тому

    You're an excellent tutor.

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

    You're a Pro, Mosh! Thanks vm

  • @EH-yl5ex
    @EH-yl5ex 2 роки тому

    Thanks, very useful. Well done.

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

    I hope you will continue and thank you very much
    you are my teacher

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

    I love your tutorials

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

    Great video, Thank you!

  • @leomysky
    @leomysky 11 місяців тому

    Thank you for the explanation

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

    Amazing tutorial

  • @samuinsaurralde2866
    @samuinsaurralde2866 Рік тому +5

    Thanks for your excellent video!! Where I can download the files did you use in your examples?

  • @Julian-tf8nj
    @Julian-tf8nj 2 роки тому

    super helpful, thanks!

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

    Thanks for this tutorial!!!

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

    You're the best mosh ❤️💙

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

    Your are the best "mosh".. no one can beat you

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

      Thank you! Please support me by liking and sharing this video. :)

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

    Flutter tutorial please, we have all been waiting so long for that 😀👍

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

    Amazing tutorial! i'm so tired of just stackOverflow codes without explain, thanks so much!

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

    thank you mosh ...lovely !!

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

    I just want to let you know that your courses are top class.
    One improvement I would like to see in your course is the project you develop during the lectures. Even though *Vidly* is really a good project, I would like to see much complex project than that. Maybe an e-commerce project. Point is: you have tons of cool techniques to improve the quality of code which we can learn from your experience.

  • @TestAutomationTV
    @TestAutomationTV 7 місяців тому

    Thanks for sharing, it was a useful video.

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

    Very Very Thank Your videos are very good.

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

    Hi, what are your terminal configurations for the highlighted autocomplete? Thanks.

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

    This guy is thug, everything is easy in his world. Thanks so much for all the effort Moch!

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

    The reason version has to be in quotes for docker-compose is that yaml spec parses numbers such as 3.0 to 3 and it breaks versioning.

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

    Nice tutorial, thanks. It's full of valuable information.

  • @mrmxyzptlk8175
    @mrmxyzptlk8175 Рік тому +5

    at 5:50 you say that below the video is a zip file, but there is no zip file.

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

    Fantastic course

  • @Noor-Mohammed-S-248
    @Noor-Mohammed-S-248 2 роки тому

    Need more videos on docker Thanks!

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

    Which theme did you use in vs code for HTML and CSS tutorial?

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

    what is the difference between docker-compose and docker compose.. I noticed that I'm getting an error when I use docker-compose but everything works well when I change it to docker compose .. without the dash

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

    What vs code extensions and terminal do you use?

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

    Great Video. I am new to docker compose. I tried the same steps as per your docker compose file but gut this error. nable to prepare context: path "./frontend" not found does VS Code follow indentation?

  • @Hearty-fb2in
    @Hearty-fb2in 2 роки тому +1

    Hi mosh I was seeing that the code on python was not with the @client.event part and I’m very confused could you help me on what to do

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

    Great job 👍.

  • @jackq9197
    @jackq9197 Рік тому +4

    Thanks for this wonderful tutorial.
    I'm trying to follow however could not find the link to download the zip file.

  • @Ana-by1eu
    @Ana-by1eu 5 місяців тому +2

    Is there really a zip file attached below the video? I can't find it. Anyone? Thanks!

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

    Helpful , thanks

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

    Where's the ZIP file you were talking about attached belowed - i'm unable to find it

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

    nicely explained

  • @patrikwihlke4170
    @patrikwihlke4170 2 роки тому +2

    14:09 I think that could be to allow subversions like 3.8.2 etc which would not translate well as numbers.

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

      Also, version is deprecated and ignored by docker. It's literally just a comment at this point. From Docker spec (emphasis in original): "A Compose implementation SHOULD NOT use this version to select an exact schema to validate the Compose file, but prefer the most recent schema at the time it has been designed."

  • @richakumari6267
    @richakumari6267 3 місяці тому +4

    5:51
    where is the zip file ?

  • @sathvikmalgikar2842
    @sathvikmalgikar2842 5 місяців тому

    You are awesome 🔥🔥

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

    You are always awesome. Everybody loves you :)

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

    hi moshi, long time , you the best man

  • @468hitman
    @468hitman 2 роки тому

    Very good tutorial

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

    Thanks for sharing

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

    Hi Mosh,
    what IDE are you using and is it on Mac or Windows? Thanks

  • @nuttchokwittaya8225
    @nuttchokwittaya8225 Рік тому +6

    Are you sharing the code for this tutorial anywhere?

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

    Great work and thanks again! I like that VS Code editor color scheme. What is that called?

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

    I was waiting for this ep. and enjoyed it!!!!! :DDDDD
    But can you please make a c++ beginner tutorial?

  • @IslahMusleh
    @IslahMusleh 2 роки тому +12

    Where can I find the zip file for backend and frontend projects mentioned in the video?

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

      Same question here =(

    • @miked5444
      @miked5444 2 роки тому +3

      I don't know either so replying here so hopefully I get a notification if someone tells you.

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

      Purchase the course

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

    Love it, I’m being stuck for 2 weeks

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

    what a great video !!!

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

    How can one determine what the needs of the project are for a docker compose file? How do you know what the requirements are?

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

    Awesome thanks