what is the difference between Docker and Docker Compose

The difference between Docker and Docker-compose is simple: docker commands are focused on only one container (or image) at once while docker-compose manage several containers docker.

Docker Compose - Work With Multiple Containers || ToolsQA

An example of difference of docker and docker compose is when you run these commands:

  docker ps (-a)  

In Docker, docker ps displays every docker instance currently running in your environment. If you add the -a option, then you even have the stopped ones.

  docker network ls  
  docker-compose ps   

In Docker Compose, the docker network ls list the networks and docker-compose ps displays all the containers once started with it (currently running or not).

Leave a Comment

Your email address will not be published. Required fields are marked *