- 查看容器的ip
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id
- 在容器中执行命令并返回结果
docker exec -it container_name_or_id commands
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id
docker exec -it container_name_or_id commands
本文标题:docker 常用易忘命令
本文链接:https://www.haomeiwen.com/subject/hfydprtx.html
网友评论