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.
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
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!
Its been a while I have used compose and this video gave me good refresh. Thx mate.
Happy to be of service!
Finally a complete solution for Docker-compose and Dockerfile, Kudos Cameron
Great video. To the point. Helped me know and understand exactly what I wanted. Thanks!
Thanks for the kind words! Trying to keep the whole Dockerfile versus docker-compose thing as short and concise as possibe!
Thank you. A great video. Very clear explanations.
Thanks! I always found people overcomplicate docker compose. It's really not that complicated.
Excellent tutorial, I learned a lot from this 👍
Amazing video. To the point, thank you sir!
Really cool video! Eventually something with positive vibe unlike most lifeless yt tutorials.
thank you for your simple and handy description
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!
Many thanks. Excellent explanation.
You're fun to listen to. Subbed.
really thank you ! amazing way to explain
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!
amazing video
Lots of people are confused on the purpose of docker-compose. Hope I helped make it clear.
Thanks good refresh :)
nice vid man
Thanks! This is one of my favorites!
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.
I simply can't keep up. 🤣Thanks for watching! 🙏
Thank you sir! Now i got the ideia ahahah
can you do all these with Portainer? since it's GUi it's easier.
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)?
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?
1/ YES. The default name is docker-compose.yml
2/ No significant difference. Both can be used interchangeably
thank you, so much, i am using portainer ce and the learning curve is geometric lol