generated from jackyzha0/quartz
-
-
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.
Affected files: content/.obsidian/plugins/recent-files-obsidian/data.json content/.obsidian/workspace.json content/docker/Docker CLI Commands.md content/docker/Docker Container Lifecycle.md content/docker/cli-commands/docker container prune.md content/docker/cli-commands/docker logs.md content/docker/cli-commands/docker ps.md content/docker/cli-commands/docker stop, kill.md
- Loading branch information
Showing
8 changed files
with
137 additions
and
78 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
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
This file was deleted.
Oops, something went wrong.
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
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,28 @@ | ||
--- | ||
draft: false | ||
date: 2024-06-20 18:20 | ||
tags: | ||
- docker | ||
--- | ||
|
||
The `docker container prune` will get your confirmation and remove all stopped containers from your local machine. | ||
|
||
```bash | ||
docker container prune | ||
|
||
# WARNING! This will remove all stopped containers. | ||
# Are you sure you want to continue? [y/N] y | ||
|
||
# Deleted Containers: | ||
# 610ea68044541a3b4e2bac5ca889b6978e1fa529dd5c96199aeeb11b9b9b5765 | ||
# 65ed6cd1dfba08a177fcdead54133071c85280e5a73311c86300e967a4fa9c23 | ||
# 3f0e22ece1bf45ddb0ba2e5a02ea61bf2508a31f4f3fadc1987b14b97f500f72 | ||
# 01fcc6eb224d745d16e52055e5a643a9bdeea0de75c587a10fbff20c04f2b23b | ||
|
||
# Total reclaimed space: 32B | ||
``` | ||
|
||
|
||
> [!info] References | ||
> - [Docker and Kubernetes: The Complete Guide](https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide) | ||
> - [docker container prune | Docker Docs](https://docs.docker.com/reference/cli/docker/container/prune/) |
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,33 @@ | ||
--- | ||
draft: false | ||
date: 2024-06-20 18:45 | ||
tags: | ||
- docker | ||
--- | ||
|
||
The `docker logs` command allows you to read the output from `STDOUT` and `STDERR` of a a [[docker container|container]] as a batch. You can add a `-f` or `--follow` flag to stream the output from the container in real time. | ||
|
||
```bash | ||
docker logs [options] container_id | ||
``` | ||
|
||
>[!example] | ||
> | ||
>The following example uses `docker logs` to retrieve the output of the container created with `hello-world` [[docker image|image]]. | ||
> | ||
>```bash | ||
>docker create hello-world | ||
># 319297ab159e46b41a1cd580e2c02f05e40ca43f76b3fb679e478d7a6ae16c57 | ||
> | ||
>docker start 319297ab159e46b41a1cd580e2c02f05e40ca43f76b3fb679e478d7a6ae16c57 | ||
># 319297ab159e46b41a1cd580e2c02f05e40ca43f76b3fb679e478d7a6ae16c57 | ||
> | ||
>docker logs 319297ab159e46b41a1cd580e2c02f05e40ca43f76b3fb679e478d7a6ae16c57 | ||
># Hello from Docker! | ||
># This message shows that your installation appears to be working correctly. | ||
>``` | ||
|
||
> [!info] References | ||
> - [Docker and Kubernetes: The Complete Guide](https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide) | ||
> - [docker container logs | Docker Docs](https://docs.docker.com/reference/cli/docker/container/logs/) |
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,23 @@ | ||
--- | ||
draft: false | ||
date: 2024-06-20 18:05 | ||
tags: | ||
- docker | ||
--- | ||
|
||
The `docker ps` (short for `docker container ls`) command allows you to check the `CONTAINER_ID`, `IMAGE_NAME`, `COMMAND`, `CREATED_TIME`, `STATUS`, `PORTS`, and `NAME` of the running container. | ||
|
||
```bash | ||
docker ps [options] | ||
``` | ||
|
||
>[!example] | ||
>You can add an `-a` or `-all` flag to `docker ps` to show information about all containers you've run before. Without this flag, you will only see the currently running containers. | ||
> | ||
>```bash | ||
>docker ps -a | ||
>``` | ||
> [!info] References | ||
> - [Docker and Kubernetes: The Complete Guide](https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide) | ||
> - [docker ps | Docker Docs](https://docs.docker.com/reference/cli/docker/container/ls/) |
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