Docker

Docker provides a faster and kind of system independent method to deploy software across multiple systems. Since images run in containers, this provides a type of sandboxing ( similar to JAVA runtime environment ) and are independent of platform provided docker is setup on the platform. 

Docker containers are not Virtual Machines and do not carry own Operating System ( OS ) or space unlike Virtual Machines. Docker containers are much lighter than VMs and share the host OS and space.

Dockers can be used to isolate an application from the system whereas Virtual Machine isolates a complete mini system from the system. They are at different level of abstraction.

docker-compose.yml: lists down all the containers to spin up, their dependecies if any, volumes and other options/commands to run

Dockerfile: lists down all the steps to build a docker image and other options/commands to run