Skip to content

Commit

Permalink
Adding Docker CheatSheet
Browse files Browse the repository at this point in the history
  • Loading branch information
Suryansh1720001 committed Oct 14, 2022
1 parent 3146cdd commit 709e8db
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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.

- Official website - [https://www.docker.com/](https://www.docker.com/)

- Documentation - [https://docs.docker.com/](https://docs.docker.com/)

## Build
Building an image from Dockerfile
```sh
docker build -t app_name:1.0 .
```
List all images
```sh
docker images
```


## Run
Run docker image
```sh
docker run -p 8001:8001 -it app_name:1.0
```

List all running containers
```sh
docker ps
```

Kill a running container

```sh
docker kill container_name/ container_id
```

## Prune
```sh
docker system prune # prune all docker resources
docker system prune -f # prune all resources with force (without prompt)
```

## Attributes

- https://aws.amazon.com/docker/


0 comments on commit 709e8db

Please sign in to comment.