I'm a software developer who writes about Laravel, JavaScript, Rails, Linux, Docker, WordPress and the tech industry. Follow me on Twitter @tylerlwsmith
Do you have any advice regarding when to use docker-compose vs when to use a Dockerfile and programmatically install the individual services into one container?
A container is standardized unit of software which is lightweight, standalone while Docker Compose provides a way to orchestrate multiple containers (applications) that work together.
In a real-world, you may need more than one components (application) to run a software. For example: a software may need many components like database, webserver, cache server, and more to run. Each of these components is a unit.
When you have multiple components to deal with, you should use docker-compose to orchestrate them.
Don't package everything into a single container. A container is a unit of software.
I'm a software developer who writes about Laravel, JavaScript, Rails, Linux, Docker, WordPress and the tech industry. Follow me on Twitter @tylerlwsmith
That's a killer way to describe containers, thank you for your insight! I've been spending the day wrangling with docker-compose and was wondering if I was crazy for not just using a single Dockerfile.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for writing this article!
Do you have any advice regarding when to use docker-compose vs when to use a Dockerfile and programmatically install the individual services into one container?
Hi Tyler,
Thanks for reading.
A container is standardized unit of software which is lightweight, standalone while Docker Compose provides a way to orchestrate multiple containers (applications) that work together.
In a real-world, you may need more than one components (application) to run a software. For example: a software may need many components like database, webserver, cache server, and more to run. Each of these components is a unit.
When you have multiple components to deal with, you should use docker-compose to orchestrate them.
Don't package everything into a single container. A container is a unit of software.
"A container is a standardized unit of software."
That's a killer way to describe containers, thank you for your insight! I've been spending the day wrangling with docker-compose and was wondering if I was crazy for not just using a single Dockerfile.