跳至主要內容

Reminder: Docker commands that I use a lot but rarely remember.

The following command, please add sudo before docker if it’s needed.

Remove all exited containers

docker rm $(docker ps -a -f status=exited -q)

Remove all dangling images

docker image rm -f $(docker images -f dangling=true -q)

Remove all exited containers, unused networks, dangling images, and dangling build cache

docker system prune

Check network status and details

docker network inspect NETWORK_NAME

Login and execute a command in a running Docker container

docker exec -it CONTAINER_NAME /bin/sh
分類:Reminder

搶先發佈留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

由 Compete Themes 設計的 Author 佈景主題