mark
iterm2 fixed

sudo rm /private/var/log/asl/*.asl

这里标题出现 Emoji字符 不可以正常解析
这里记载一下Docker 🐳的一些常用命令

# 杀死所有正在运行的容器

    docker kill $(docker ps -a -q)

# 删除所有已经停止的容器

    docker rm $(docker ps -a -q)

# 删除所有未打 dangling 标签的镜像

    docker rmi $(docker images -q -f dangling=true)

# 删除所有镜像
    
    docker rmi $(docker images -q)
👇的有用的脚本可以考虑加载在 `.bashrc` 里面
# ~/.bashrc
# Kill all running containers.
alias dockerkillall='docker kill $(docker ps -q)'

# Delete all stopped containers.
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'

# Delete all untagged images.
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'

# Delete all stopped containers and untagged images.
alias dockerclean='dockercleanc || true && dockercleani'
Comments
Write a Comment