Differences Between Docker Compose and Dockerfile by Example

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • Confused over the difference between docker-compose and Dockerfile? Are you wondering when you would use docker-compose over a Dockerfile? This quick tutorial will compare Dockerfiles with docker-compose.yaml files, and show you how to build your Docker images with a Dockerfile and use docker-compose.yaml and docker-compose up commands to run your Docker containers. This comparison between docker-compile and Dockerfiles will make the differences between these two cloud-native Docker components crystal clear.

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

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

    Here's a more detailed article I wrote about the differences between the Dockerfile and Docker Compose. Please check it out!
    www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Dockerfile-vs-docker-compose-Whats-the-difference

  • @rameenkhan4913
    @rameenkhan4913 Год назад +3

    I have been sitting still for 5.5 hours to understand the concept of docker and files related to it mainly ,browsing the internet and watching hundreds and hundreds of YT videos to grasp the whole concept for doing my assignment with complete understanding and then I found this video perfect rhythm of explaining things. Helped me understand things more clearly, THANKS!

  • @therakag
    @therakag 9 месяцев назад +1

    Its been a while I have used compose and this video gave me good refresh. Thx mate.

    • @cameronmcnz
      @cameronmcnz  8 месяцев назад

      Happy to be of service!

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

    Finally a complete solution for Docker-compose and Dockerfile, Kudos Cameron

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

    Great video. To the point. Helped me know and understand exactly what I wanted. Thanks!

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

      Thanks for the kind words! Trying to keep the whole Dockerfile versus docker-compose thing as short and concise as possibe!

  • @mevin-three-dplusmoreltd2120
    @mevin-three-dplusmoreltd2120 11 месяцев назад +1

    Thank you. A great video. Very clear explanations.

    • @cameronmcnz
      @cameronmcnz  11 месяцев назад

      Thanks! I always found people overcomplicate docker compose. It's really not that complicated.

  • @LeandroOliveira-kn9qx
    @LeandroOliveira-kn9qx 23 дня назад

    Amazing , very good and clear information.

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

    thank you for your simple and handy description

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

      Glad I could help. When I was learning Kubernetes, the difference between all these files became confusing. I was surprised there wasn't more straight-forward information explaining it. Glad I could help you out. It helped me out putting this together!

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

    Really cool video! Eventually something with positive vibe unlike most lifeless yt tutorials.

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

    Excellent tutorial, I learned a lot from this 👍

  • @LuisPerez-xl7bk
    @LuisPerez-xl7bk Год назад +1

    amazing video

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

      Lots of people are confused on the purpose of docker-compose. Hope I helped make it clear.

  • @Harveysadi
    @Harveysadi 2 года назад +2

    really thank you ! amazing way to explain

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

      Thanks! All the docker compose examples I see are often complicated with multiple containers. Sometimes it's good to just simplify. Thanks for the kind words!

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

    Many thanks. Excellent explanation.

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

    You're fun to listen to. Subbed.

  • @WaqasNazir-fz6bo
    @WaqasNazir-fz6bo Год назад

    Amazing video. To the point, thank you sir!

  • @ivandrofly
    @ivandrofly 6 месяцев назад

    Thanks good refresh :)

  • @kensol123
    @kensol123 Год назад +1

    nice vid man

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

      Thanks! This is one of my favorites!

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

    FYI: YAML's acronym has changed because it's used for more than just markup apparently. Its now YAML Ain't Markup Language. At least according to the great wiki.

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

      I simply can't keep up. 🤣Thanks for watching! 🙏

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

    2 questions regarding the compose file,
    1/ Does the name of the compose file has to be spelled as "docker-compose" for all docker projects?
    2/ What is the different between .yaml and yml? I see both types of extensions. Are they the same?

    • @gbengaoyewole3377
      @gbengaoyewole3377 Год назад +1

      1/ YES. The default name is docker-compose.yml
      2/ No significant difference. Both can be used interchangeably

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

    In this example, there is only 1 container service. In the compose file, there is an entry "cpus: 1.5"
    If there are multiple running containers specified in a compose file, does setting cpus to be 1.5 in this nginx service rob system resources (in this case CPU) from concurrent running apps (not just concurrent running docker containers)?

  • @novianindy887
    @novianindy887 Год назад +1

    can you do all these with Portainer? since it's GUi it's easier.

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

    Thank you sir! Now i got the ideia ahahah

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

    thank you, so much, i am using portainer ce and the learning curve is geometric lol