I am relatively new to docker and exploring it.I want to know what is the basic difference between a docker-compose.yml file and a simple docker file.
Dockerfile describes how to build a Docker image - it's essentially Docker's version of Makefile or pom.xml or build.gradle
docker-compose.yml describes how the image is to be deployed, that is all the things necessry to create both the container and the environment it needs to run (like networks or volumes). If several containers need to work together the description of how to deploy them together, in which order, how to link them an so on can be put into a single docker-compose.yml
See documentation for Dockerfile and docker-compose.yml for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With