Skip to content

Commit

Permalink
delete space
Browse files Browse the repository at this point in the history
  • Loading branch information
yuy4o committed Sep 4, 2024
1 parent 831d9aa commit a7c1179
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _posts/2023-02-19-Docker入门.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ Windows下 `Apply&Restart`,Linux下 `sudo systemctl restart docker && sudo sys

3.`docker ps` 查看当前正在运行的容器,`docker ps -a` 查看所有容器(包含停止运行的)的状态

`docker start <CONTAINER ID>`:启动已终止容器,`docker inspect <CONTAINER ID>/<IMAGE ID>`:查看容器/镜像的元数据,`docker inspect -f '{%{% range .NetworkSettings.Networks %}%}{%{% .IPAddress %}%}{%{%
end %}%}' <CONTAINER ID>`:查看容器的IP地址
`docker start <CONTAINER ID>`:启动已终止容器,`docker inspect <CONTAINER ID>/<IMAGE ID>`:查看容器/镜像的元数据,`docker inspect -f '{%{%range .NetworkSettings.Networks%}%}{%{%.IPAddress%}%}{%{%end%}%}' <CONTAINER ID>`:查看容器的IP地址

`docker stop <CONTAINER NAME>` + `docker rm <CONTAINER NAME>` / `docker rm -f <CONTAINER NAME>``<CONTAINER NAME>` 换成 `<CONTAINER ID>`也行:停止或删除容器

Expand Down

0 comments on commit a7c1179

Please sign in to comment.