Differences Between Docker Compose and Dockerfile by Example

Поділитися
Вставка
  • Опубліковано 18 тра 2022
  • 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.

КОМЕНТАРІ • 31

  • @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 7 місяців тому +1

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

  • @prathameshpawar346
    @prathameshpawar346 Рік тому +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 10 місяців тому +1

    Thank you. A great video. Very clear explanations.

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

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

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

    Excellent tutorial, I learned a lot from this 👍

  • @WaqasNazir-fz6bo
    @WaqasNazir-fz6bo Рік тому

    Amazing video. To the point, thank you sir!

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

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

  • @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!

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

    Many thanks. Excellent explanation.

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

    You're fun to listen to. Subbed.

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

    really thank you ! amazing way to explain

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

      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!

  • @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.

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

    Thanks good refresh :)

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

    nice vid man

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

      Thanks! This is one of my favorites!

  • @kurtu5
    @kurtu5 Рік тому +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  Рік тому +1

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

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

    Thank you sir! Now i got the ideia ahahah

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

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

  • @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)?

  • @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

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

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