forked from Suryansh1720001/Developer-Cheatsheet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3146cdd
commit 709e8db
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ | ||
|
||
|