File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ $ curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sudo sh -s http://1
2424
2525参考:https://docs.docker.com/engine/installation/
2626
27+ 入门:http://tuxknight-notes.readthedocs.io/en/latest/docker/docker_command.html
28+
29+ 笔记:https://blog.phpgao.com/docker-note1.html#%E6%9E%84%E5%BB%BA%E9%95%9C%E5%83%8F
30+
2731```
2832$ curl -sSL https://get.daocloud.io/docker | sh
2933```
@@ -209,3 +213,29 @@ accbcfa5e2e6 hello-world "/hello" 15 hours ago
209213$ sudo docker rm angry_bhabha
210214```
211215
216+ 删除镜像
217+ ```
218+ $ sudo docker rmi hello-world
219+ ```
220+
221+ 删除所有正在运行的容器
222+ ```
223+ $ sudo docker kill $(docker ps -a -q)
224+ ```
225+
226+ 删除所有已经停止的容器
227+ ```
228+ $ sudo docker rm $(docker ps -a -q)
229+ ```
230+
231+ 删除所有镜像
232+ ```
233+ $ sudo docker rmi $(docker images -q)
234+ ```
235+
236+ 构建镜像
237+ ```
238+ sudo docker build --rm=true -t zh/redis .
239+
240+ sudo docker build --rm=true -t zh/redis -f redis.dockerfile
241+ ```
You can’t perform that action at this time.
0 commit comments