docker 停止、启动、删除镜像指令

2020-12-12 17:37:06

docker对容器的一些操作

 docker ps // 查看所有正在运行容器
 docker stop containerId // containerId 是容器的ID
 docker ps -a // 查看所有容器
 docker ps -a -q // 查看所有容器ID
 docker start $(docker ps -a -q) // start启动所有停止的容器
 docker stop $(docker ps -a -q) // stop停止所有容器
 docker rm $(docker ps -a -q) // remove删除所有容器

docker对镜像的一些操作

删除所有镜像

docker rmi $(docker images -q)

根据格式删除所有镜像

docker rm $(docker ps -qf status=exited)


  • 2017-11-06 01:00:17

    撤销git add

    如何撤销git add,不小心执行了git add . 操作,但是又不能提交所有的文件,因为对应不同的分支,现在怎么样可以将git add 撤销回来

  • 2017-11-10 00:06:15

    CORS: credentials mode is 'include'

    XMLHttpRequest cannot load http://localhost/Foo.API/token. The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:5000' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.