查看所有映像檔(images)

docker images

 

刪除映像檔(image)

docker rmi <image id>
參數 -f (強迫)

 

查看所有執行中的容器(containers)

docker ps -a

 

查看所有容器(containers)

docker container ls

 

刪除容器(container)

docker rm <container id>

 

進入容器(container)

docker exec -it <container Id> /bin/bash

 

暫停容器(container)

docker stop <container>

 

image用容器運行

docker run -it --privileged --name <container name> -p 8080:8080 <image name>

-it 參數代表在執行 Docker 虛擬容器環境時,開啟虛擬終端機,以互動的模式執行
--privileged 給予執行權限
--name 給container名字
-p 8080:8080 把主機的8080 port mapping到Container容器的8080 port

 

查看所有網路(network)

docker network ls

 

查看網路詳細資訊

docker network inspect <network name>
arrow
arrow
    文章標籤
    Docker
    全站熱搜

    Mark Zhang 發表在 痞客邦 留言(0) 人氣()