For a beginner, the term docker and docker-compose might seems confusing.

So what exactly is the difference between docker and docker-compose?

In a nutshell, docker manages single containers.

While docker-compose manages multiple containers.

Docker container will start from the instruction written in dockerfile

The docker-compose.yml file is required to start containers using docker-compose.

The user needs to type the below command to start a docker container

docker build -t <image_name> . docker run <image_name>

Type the below command to start containers from a compose file

docker-compose up -d