Ultimate Docker Compose Tutorial

Поделиться
HTML-код
  • Опубликовано: 1 июн 2024
  • Learn Docker Compose - From Zero to Hero in 1 Hour
    💙 6-month DevOps Bootcamp: bit.ly/3tKPIvA
    🧡 GitLab Course with K8s, Microservices, Multi-Stage: bit.ly/3SaOWkZ
    #dockercompose #docker #techworldwithnana
    ▬▬▬▬▬▬ Thank you Warp for sponsoring this video 👏 ▬▬▬▬▬▬
    🙌 Warp is a modern terminal with AI built in: bit.ly/warp-techworldwithnana
    🙌 You can sign up with my referral link and get a free unique theme: app.warp.dev/referral/W6Q36Y
    Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application's services.
    ▬▬▬▬▬▬ R E F E R E N C E S 🔗▬▬▬▬▬▬
    ► Git repo: gitlab.com/twn-youtube/docker...
    ► Docker Installation: docs.docker.com/get-docker/
    ► Using Secrets in Compose: docs.docker.com/compose/use-s...
    ► Job Market : newsletter.pragmaticengineer....
    ▬▬▬▬▬▬ Course Pre-Requisites ▬▬▬▬▬▬
    👉 Docker Crash Course: • Docker Crash Course fo...
    ▬▬▬▬▬▬ What you’ll learn in 1 Hour ✅ ▬▬▬▬▬▬
    ► What is Docker Compose and why it's useful
    ► Docker Compose Use Cases
    ► How Docker Compose works
    ► Docker Compose Syntax: Map Docker commands to Compose definition
    ► Docker Compose Commands (docker compose up and down vs start and stop)
    ► DEMO: Run application with 3 services with Docker Compose
    ► Using Variables in Docker Compose
    ► Reference Docker image from private repository
    ► Limitations of Docker Compose
    ► Docker Compose vs Kubernetes
    ▬▬▬▬▬▬ Next Step ▬▬▬▬▬▬
    👉 Learn Kubernetes: • Kubernetes Crash Cours...
    ▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
    00:00 - Intro and Course Overview
    00:24 - Pre-Requisites to learn Docker Compose
    01:12 - What is Docker Compose
    02:52 - Demo - Without Docker Compose
    10:09 - Why Docker Compose
    11:58 - From Docker Commands To Compose File
    16:13 - Create Compose File and start application
    20:52 - Control Startup Order
    23:22 - Docker Compose Commands (Up and Down vs Start and Stop)
    27:18 - Connect own web application
    40:36 - Variables in Docker Compose
    44:28 - Docker Compose Secrets
    46:41 - Use image from private repository
    58:36 - Limitations, DockeR Compose vs Kubernetes
    ▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬
    INSTAGRAM ► bit.ly/2F3LXYJ
    TWITTER ► bit.ly/3i54PUB
    LINKEDIN ► bit.ly/3hWOLVT

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

  • @TechWorldwithNana
    @TechWorldwithNana  4 месяца назад +33

    Thank you for your comments and many messages about the leaked password. What a community 💙 Already updated it 👍
    If this video was helpful, be sure to subscribe and give a like 😊 Also any tips or learnings you want to share with others? 👀

    • @tonytran2687
      @tonytran2687 4 месяца назад +1

      ❤awesome, thanks Nana!

    • @srinuk5446
      @srinuk5446 4 месяца назад

      Simply superb... Awesome.... Thanks a lot .... NANA.... HAPPY TO SEE THIS

    • @silenthill47
      @silenthill47 4 месяца назад

      It helped a lot, but there should have volume part as well. Can you add that here?

    • @srh1034
      @srh1034 2 месяца назад +1

      Amazing course but very annoying with the command line being blocked by RUclips progress bar.

  • @pragmaticcoder6910
    @pragmaticcoder6910 4 месяца назад +29

    Please don’t stop making videos. Your teaching skills are amazing.

  • @saffanalvy
    @saffanalvy 4 месяца назад +13

    You actually make practical and production level oriented tutorials. This is rare. I like it. Thanks.

  • @bek_shoyatbek
    @bek_shoyatbek 3 дня назад

    Thank you so much, I have learned a lot. I had no idea of Docker and docker compose but after your lessons I have deployed several our projects with Docker easily :)

  • @warpdotdev
    @warpdotdev 4 месяца назад +16

    Thank you for such a great demo of Warp's features in your video, Nana!
    Outside of the sponsorship, you did an amazing job with this video. We loved the comparison of what life would be like without Docker Compose & your comparison of Docker Compose vs Kubernetes at the end.
    Viewers, if you do end up trying out Warp, please let us know if you run into any issues or have feedback 👍

    • @TechWorldwithNana
      @TechWorldwithNana  4 месяца назад +3

      Thank you so much for such amazing feedback on the video! 💙 I definitely enjoyed using the Warp terminal 😊🚀

    • @petersandovalmoreno5213
      @petersandovalmoreno5213 4 месяца назад

      Available for windows?

    • @arnabgolder2783
      @arnabgolder2783 2 месяца назад

      im using warp terminal for ubuntu version 22 and after installing it not shown ui page

  • @nagdali9209
    @nagdali9209 3 месяца назад +3

    The way that you introduce the topics extremely amazing.

  • @albertoruiz146
    @albertoruiz146 3 месяца назад +1

    I've watched some of your tutorials on Docker and now on Docker Compose. I am learning a lot. Thank you.

  • @manassengudia1854
    @manassengudia1854 4 месяца назад +4

    I really like your videos and how straightforward you explain things without overwhelming . Thanks Nana

  • @dmytro7441
    @dmytro7441 4 месяца назад +3

    Two days ago wanted to find similar video on you channel and here it is 😊
    Thank you so much!

  • @romaindede8699
    @romaindede8699 4 месяца назад +2

    @TechWorldwithNana
    web-application part:
    I think it is better to use `npm ci` instead of `npm install` to ensure consistency and speed; especially in production. :)
    (I understand that this is just an example, but I think, it may be worth showing production-oriented orders.)
    ```Dockerfile
    FROM node:20-alpine
    # Set the working directory in the container (If the directory does not exist, Docker will create it.)
    WORKDIR /home/app
    # Copy the application files to the working directory in the container
    COPY ./app .
    # Install dependencies using npm ci for consistency and speed
    RUN npm ci
    # no need for /home/app/server.js [...]
    ```
    Thanks again for your superb content!

  • @raghuveer120
    @raghuveer120 4 месяца назад +3

    Fan of your work Nana ❤. Thanks for educating everyone.

  • @boring-username
    @boring-username 4 месяца назад +6

    Names don't need to be creative so long as they're consistent and to-the-point 👍 Your naming convention is great!

  • @asaadfayyaz
    @asaadfayyaz 2 месяца назад +3

    Thank you again Nana, You are officially my primary mentor in devops. Your content is so direct and you pack so much in the limited time without us feeling overwhelmed. Keep doing the great work.

  • @RemcovanZuijlen
    @RemcovanZuijlen 4 месяца назад +5

    This tutorial is perfect for people who want to start with docker-compose. I use it for a couple of years already.
    I was a little surprised you used 'docker build' and 'docker push' to build and push the image to the registry. I use docker-compose for that as well. Just supply the image and build arguments in the yaml file and it works with just 'docker-compose build' and 'docker-compose push' as well. This also makes it less complicated.

  • @oladejiolaoluwa9155
    @oladejiolaoluwa9155 4 месяца назад +9

    Hi Nana
    I've started my DevOps course and I've been following your roadmap....Thank you

  • @kjvisual7
    @kjvisual7 3 месяца назад +4

    I'm only 16 minutes into your tutorial, but I want to pause to let you know that I really appreciate your clear communication. It's so refreshing. Thank you. I'll check back later.

  • @ousamabenyounes8344
    @ousamabenyounes8344 2 месяца назад +2

    really really cool video nana! thanks a lot and wish you success

  • @giodzirkvelishvili1168
    @giodzirkvelishvili1168 3 месяца назад +2

    Thank you Nana for this amazing and high quality video 🙌
    Best wishes from Georgia 🇬🇪
    მადლობა ❤

  • @adeelrana1
    @adeelrana1 3 месяца назад

    Everything about the containerized environment, Docker, Kubernetes, Prometheus, minikube, Terraform, Ansible and a lot more I learned only from your videos that successfully landed me a great job as a Senior Software Engineer, There is nothing on your channel that I didn't look. Thank you so much for giving the right path.

  • @julienfourniols3764
    @julienfourniols3764 3 месяца назад

    Your videos are uncredible of simplicity and full explanations. All is clear even for neebies! Thx!

  • @teeseira
    @teeseira 4 месяца назад +7

    This video came at the right time as I’ve been learning Docker this week 🐳✨

  • @yomajo
    @yomajo 4 месяца назад +2

    version in yaml start is optional. From docs:
    The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative.
    Compose doesn't use version to select an exact schema to validate the Compose file, but prefers the most recent schema when it's implemented.

  • @user-lz3su5cr3s
    @user-lz3su5cr3s 17 дней назад

    Finally, I found what I needed! AWESOME! Thanks a million!

  • @kasali310
    @kasali310 4 месяца назад +1

    Thanks for your great and clear tutorial Nana. A video about well-known issues in docker or any DevOps tool will be great.

  • @TheCodingChamelion
    @TheCodingChamelion 4 месяца назад +2

    explained very easily the best channel for docker and k8s and others

  • @laurentvoisin8129
    @laurentvoisin8129 3 месяца назад +2

    Very helpful vidéo ! Thank you so much Nana. i'm a french fifty years old beginner in DevOps. 👍

  • @MrVernuk
    @MrVernuk 4 месяца назад +2

    Thanks, Nana! After this course my docker-compose knowledge has been more structured 😉

  • @thomash.8297
    @thomash.8297 4 месяца назад

    That‘s what I needed. Thanks Nana!

  • @omara2248
    @omara2248 2 месяца назад

    Great video, going at the right pace, I learned so much. Thank you!

  • @TOLANIAKINTAYO
    @TOLANIAKINTAYO 3 месяца назад

    Thank you Nana, Your video was very helpful in helping to understand the concept of docker compose better

  • @badeggJbetter
    @badeggJbetter 3 месяца назад

    Thank You Nana, it was really clear and I learned a lot

  • @silenthill47
    @silenthill47 4 месяца назад +1

    Very informative. Thank you!

  • @chrisogonas
    @chrisogonas 2 месяца назад

    Awesome! That was tremendously helpful. Thanks

  • @timgraf7933
    @timgraf7933 4 месяца назад

    Thank you Nana for this great tutorial.

  • @arantebw
    @arantebw 28 дней назад

    Thank you so much ❤ Keep creating amazing content.

  • @mo.dia97
    @mo.dia97 4 месяца назад +2

    Thank you Nana❤️ amazing work!

  • @pavankumard5276
    @pavankumard5276 3 месяца назад

    Just finished the Docker crash course tutorial, can't wait to finish this as well!!!

  • @crazykidsinacar
    @crazykidsinacar 4 месяца назад +1

    Nana thanks for everything and i love how you teaching. I would like to suggest to you, since you use Warp, to configure it to display the terminal input lines at the top. I say this because, in my case, as I watch with subtitles sometimes, the lines get mixed up

  • @letspasstime
    @letspasstime Месяц назад

    Very neat & clean explanation.... Thanks for the video👍

  • @5cyndi
    @5cyndi 4 месяца назад +1

    Thanks for this; it is just in time for me to brush up

  • @christianlestercayabyab6296
    @christianlestercayabyab6296 4 месяца назад +3

    Awesome tutorial! Hoping that you will make a video about docker swarm.

    • @TechWorldwithNana
      @TechWorldwithNana  4 месяца назад

      Thanks for your suggestion, great idea and we will consider it! 👍

  • @user-gs5tu8up8r
    @user-gs5tu8up8r 4 месяца назад +1

    Thank you so much, great stuff 😊

  • @olorundareagnes934
    @olorundareagnes934 4 месяца назад +1

    Insightful content, as usual. Thanks once again...

  • @aps8874
    @aps8874 3 месяца назад

    Hi....Thanks for making this video.This was crisp plus very insightful. Thanks again 💖

  • @VarunSharma-xd8xd
    @VarunSharma-xd8xd 12 дней назад

    once i get the job i am gonna buy all your courses to learn devops and as a payback for all this amazing content

  • @luismora7640
    @luismora7640 3 месяца назад

    Such a well-explained video. I think 1Hr max is a good time to not lose your focus and understand topics easily. Thanks for the video and the high quality of it. Keep it up!

  • @BiswajitPaul01
    @BiswajitPaul01 3 месяца назад

    Straight to the point notes.

  • @sourvsingh4528
    @sourvsingh4528 4 месяца назад +3

    I just dockerized my project for the first time. Yeahh 🎉 to me

  • @hosseinarjomandi4650
    @hosseinarjomandi4650 4 месяца назад +1

    Wow you released this video right at the time I ha finished your docker crash course

  • @cuti9114
    @cuti9114 Месяц назад

    Thankyou so much.super clear each concept😊🤗

  • @HolgerH1967
    @HolgerH1967 3 месяца назад +1

    Well done, thank you very much!

  • @TheSpeechkiss
    @TheSpeechkiss Месяц назад

    Nana is the best. There are some other good teachers too but she is the best. Nana I love you, thank you for all the hard work you put in !

  • @-anonim-3008
    @-anonim-3008 3 месяца назад +1

    Thanks a lot! It's a great video for beginners. Docker hub is our future!

  • @ClementDERYCKX
    @ClementDERYCKX Месяц назад

    A very big Thank You for your kind and helpfull work

  • @shambhunathsahani6505
    @shambhunathsahani6505 22 дня назад

    Thank you great deep high-level explained

  • @nadunsamarasinghe5592
    @nadunsamarasinghe5592 2 месяца назад

    Explanation is great and more helpful to grab more insights' of the platform. Thanks.

  • @NadirAli-ri7jb
    @NadirAli-ri7jb 3 месяца назад

    Just love you. You really know how to teach.❤❤❤❤

  • @teekwick
    @teekwick 4 месяца назад +2

    Comment for the algorithm gods, your K8S and Helm videos helped me a lot!

    • @TechWorldwithNana
      @TechWorldwithNana  4 месяца назад

      Happy to hear and thanks for your support 😊💙

  • @nikhil9076
    @nikhil9076 4 месяца назад

    @TechWorld with Nana Really likes your devops videos. Waiting for your devops tool of month series videos.

  • @nicolascuor2378
    @nicolascuor2378 4 месяца назад

    Nice tutorial, thank you 🙂

  • @bijum777
    @bijum777 4 месяца назад +1

    Much awaited video.. 😊 thanks

  • @luisedgardomartinezgarcia6512
    @luisedgardomartinezgarcia6512 4 месяца назад

    Great course!! You are excelent!

  • @davitgogidze4310
    @davitgogidze4310 4 месяца назад +2

    🎯 One of the best mentors in the devops direction ☁ 🎓✨

  • @Lunolux
    @Lunolux 4 месяца назад

    everything is well explain and easy to understand
    thx

  • @obioraokwubanego4789
    @obioraokwubanego4789 3 месяца назад

    You are a darling! Keep up the good work. Thumbs up!💚

  • @junlin5525
    @junlin5525 4 месяца назад

    awesome video and really helps a lot

  • @tzahik1
    @tzahik1 4 месяца назад +1

    Great Video Nana!
    Thank you very much! ❤
    Love from Israel.

  • @BJK1603
    @BJK1603 3 месяца назад

    Good work Nana 👍

  • @snex-techprogrammer5110
    @snex-techprogrammer5110 4 месяца назад

    Docker compose demystified in 1 hour.....great content it's.

  • @luckegugus
    @luckegugus 2 месяца назад

    Hi great thanks for your profesionell course

  • @khaledwest3255
    @khaledwest3255 4 месяца назад

    Thank you for this course, it's perfect ! Except for the namings 😜

  • @abdul755
    @abdul755 4 месяца назад +1

    Thank you so much for great video and valuable information, we are waiting for some videos related Docker file, Docker stack, and finally waiting for Azure devops course which will be golden gifted

  • @bypit9694
    @bypit9694 17 дней назад

    Thanks and greeting from center Italy

  • @itshamid1783
    @itshamid1783 4 месяца назад +1

    Thank you Nana

  • @rluijk
    @rluijk 4 месяца назад

    Thanks, both docker and docker-compose are nice refreshers after not touching this cool tools for some years.

  • @ericlloyd3664
    @ericlloyd3664 4 месяца назад

    Great Job, for me You are simply the best 👍

  • @bronco_fv
    @bronco_fv 4 месяца назад

    Thank you for this video. I do have a few comments/suggestions:
    - had to add - container_name: mongo in the mongedb service for it to work, don't know why.
    - ports: - 27017:27017 exposes mongo to the host, but is not necessary in this example because in the stack the containers can access each others ports anyway. Expose as little as necessary.
    - There's the .env file for setting the env vars which is read by default if present
    - now there is "docker compose" which is written in Go as opposed to "docker-compose" (python version if I'm correct)

  • @gmmxn
    @gmmxn 2 месяца назад

    First, thank you very much for sharing all your knowledge, I have learnt A LOT today.
    Second, looks like docker componse has been migrated from python (v 1.0) to GO (v 2.0) so now is part of the docker command itself, without the "-". Just in case someone is trying to install something "new" while watching this video (like me :D).

  • @RedVelocityTV
    @RedVelocityTV 2 месяца назад

    You're the greatest!

  • @uninconformemas
    @uninconformemas 4 месяца назад +1

    Just what i need it

  • @Angelslo690
    @Angelslo690 Месяц назад +1

    You should be declared as de-facto and mandatory tech tutor for almost anything existing on the earth.

  • @avanox3100
    @avanox3100 2 месяца назад

    thanks you again!

  • @matheusvinicius3016
    @matheusvinicius3016 Месяц назад

    that video help me a lot

  • @garyiredale3929
    @garyiredale3929 2 месяца назад +1

    Thanks

  • @fresherrecruit-oe8mx
    @fresherrecruit-oe8mx 4 месяца назад +2

    Thanks mam for giving us this amazing content

  • @adeelrana1
    @adeelrana1 3 месяца назад

    I would like to hear from you about podman and kind. It would be great to see your insight on this tech. Thank you so much for your effort.

  • @HayatuAbubakar
    @HayatuAbubakar 4 месяца назад

    Great crash course. Thank you. Do you ever use Docker Swarm? I can see you did not mention anything about it at the end, and just plugged Kubernetes as expected

  • @RetiredVet1
    @RetiredVet1 2 месяца назад

    Nice video Nana. How about replacing the environment variables with secrets stored in files. Docker documentation is confusing. I will figure it out eventually, but I don’t have a lot of experience and I thought it might make a good video.

  • @mykun8737
    @mykun8737 4 месяца назад +3

    Nana, After watching the Docker crash course video, you became my idol. Could you release a new Kubernetes crash course video in 2024? I really want to learn Kubernetes at this time.

    • @TechWorldwithNana
      @TechWorldwithNana  4 месяца назад +1

      You can watch the existing Kubernetes 1-hour crash course, it's still relevant 👍

  • @user-lf5ii8fl8i
    @user-lf5ii8fl8i 3 месяца назад

    Thx for a very well structured and insightful tutorial - thx.
    One question though regarding "Use image from private repository".
    How will docker know which private registry to use when pulling an image if the docker compose file contains multiple images from multiple private repos say ghcr and docker-hub and no logins have been provided?

  • @renatogasparotofilhinho
    @renatogasparotofilhinho 4 месяца назад

    Thanks for share

  • @mustafajawed918
    @mustafajawed918 4 месяца назад +2

    Hi,
    Shouldn't we use *env_file* key and pass our *.env* file?

  • @steven.cutright
    @steven.cutright 3 месяца назад +1

    your awesome 💪 💪

  • @vicky7664
    @vicky7664 2 месяца назад

    I was following your Docker Tutorial for Beginners [FULL COURSE in 3 Hours] and I got some questions:-
    1. I'm running this NodeJs app on an AWS EC2 instance. How do I get the Public IP address of my instance in the index.html and server.js file automatically cuz every time I start the instance the IP address gets changed.
    2. How do I get the Public IP in the container.

  • @kristof9497
    @kristof9497 4 месяца назад

    Thanks.

  • @user-wd9sf7od6f
    @user-wd9sf7od6f 3 месяца назад +1

    Thanks for this tutorial. So can any anyone suggest me how can I duplicate multiple instances of this application with separate db for each application running on unique port number

  • @HorsePowerPrhhh
    @HorsePowerPrhhh 3 месяца назад

    Hi Nana, The Docker 1h crash course which in pre-requisite for this one course is pointing to Microservices explained video(in youtube header). Should this Microservices be watched before going into this one rather than the The Docker 1h crash course?

  • @tirthjoshi3543
    @tirthjoshi3543 4 месяца назад +2

    Very informative video Nana! can you please make video on openshift because after kubernetes now software companies are shifting towards openshift from kubernetes 🙂
    Thanks for making!!

    • @TechWorldwithNana
      @TechWorldwithNana  4 месяца назад +1

      Thank you for your feedback and your suggestion! 😊 If we see more people requesting a video about it, will create it 👍

  • @casabasari
    @casabasari 4 месяца назад

    amazing video. I did the example in a computer running Win10, VSC, and Git bash. Running from the terminal in Visual Studio Code I had to create environment variable with this command:
    # ========================================================
    # Note:
    # To create enviroment variables in Linux and Mac run this:
    # export MY_VARIABLE="my_value"
    # echo $MY_VARIABLE
    # To create environment variables in Powershell VSC terminal
    # $env:MY_VARIABLE="my_value"
    # echo $env:MY_VARIABLE
    # ========================================================
    Thanks Nana, your videos are super usefull.

  • @prajeshvaridesai8644
    @prajeshvaridesai8644 4 месяца назад

    Is this zshrc? If yes, which terminal theme is this?