# Day20 : DOCKER CHEAT-SHEET

Hello , Everyone, This is my 20 blog started my day20 as AWS DevOps Engineer #90daysofchallenge with ShubhamLondhe #devops #trainwithshubham.

Docker and Docker-Compose cheat-sheet

Docker :

Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into any environment and know your code will run.

1. docker run: Create and run a new container based on an image.

2. docker ps: List running containers.

3. docker build: Build an image from a Dockerfile.

4. docker pull: Download an image from a registery

5.docker start: Start a stopped container.

7. docker stop: Stop a running container.

8. docker restart: Restart a running container

9. docker rm: Remove a stopped container

10. docker rmi: Remove an image

11. docker logs: Fetch the logs of a container

12.docker inspect: View detailed information about a container or image.

13.docker network ls: List Docker networks.

14.docker network create: Create a Docker network

15.docker network disconnect: Disconnect a container from a network

Docker-Compose :
Docker Compose is a tool for defining and running multi-container applications. It is the key to unlocking a streamlined and efficient development and deployment experience.

Compose simplifies the control of your entire application stack, making it easy to manage services, networks, and volumes in a single, comprehensible YAML configuration file. Then, with a single command, you create and start all the services from your configuration file.

Docker-Compose Commands:

1.docker-compose down: Stop and remove containers, networks, and volumes defined in the docker-compose.yml file

2.docker-compose build: Build or rebuild services defined in the docker-compose.yml file.

3.docker-compose start: Start services defined in the docker-compose.yml file.

4.docker-compose stop: Stop services defined in the docker-compose.yml file

5. docker-compose restart: Restart services defined in the docker-compose.yml file

6.docker-compose ps: List containers of services defined in the docker-compose.yml file.

7.docker-compose logs: Fetch the logs of services defined in the docker-compose.yml file.

8.docker-compose pull: Download updated images for services defined in the docker-compose.yml file.