Confused between Dockerfile and docker-compose because they look and sound similar? But they are not. Read this to clear your doubts.

I’ve seen many people get confused between a Dockerfile and a Compose file. This is primarily because both are used to modify a Docker image in a way, though it’s not technically correct.

It is easy to confuse the two terms, but it’s also necessary to understand the difference when making a conversation with a colleague or your (potential) employer.

Dockerfile is what’s used to create a container image, and a Compose file is what’s used to deploy an instance of that image as a container.

Let me go in a bit of detail so that you properly understand the difference between Docker Compose and Dockerfile.

#docker

Docker File vs Docker Compose: What's the Difference?
2.75 GEEK