docker 運維常用指令
-
stop all docker containers
docker stop $(docker ps -a -q)
-
remove all docker containers
docker rm $(docker ps -a -q)
-
remove all docker images
docker rmi $(docker images -q)
-
查詢 log 檔案的路徑
docker inspect --format='{{.LogPath}}' $INSTANCE_ID
-
Remove untag images
docker images -q --filter "dangling=true" | xargs -n1 -r docker rmi