Build a image
su
touch Dockfile
內容
From ubuntu
docker build -t imagename .
create a image
docker images
show build image
docker run -d –name imagename -t tagname
run a container
docker ps
show running container
——
docker images
show images
docker ps
show running container, get CONTAINER ID
docker stop [container id]
docker ps
check running image again
docker ps -a
show the whole container running and stopped
docker restart [container id]
restart a container
docker rm [container id]
remove a container
docker rm [container id] [container id] [container id]
remove container(s)
docker stop $(docker ps -a -q)
stop all running cainters
docker rm $(docker ps -a -q)
remove all cainters
docker rmi [imagename]
remove image
docker rmi [imagename] [imagename] [imagename]
remove image(s)
docker rmi $(docker images -a -q)
remove all images
du -sh /var/lib/docker
check images size
df -h /var/lib/docker
check available space
參考課程
隨機文章
- outlook變成Google的Gmail了嗎? (2014-02-21)
- 1111淘寶購物節 爽購代支付換來滿肚子氣 (2014-12-02)
- 請給我 ffmpeg 參數 轉換寬度最高1920px h.265 編碼 使用字幕檔 (2024-09-22)
- 微軟Surface放了很多資源進去 但是個人感受不好 (2020-12-25)
- 重覆收到同一封信多次 (2009-09-02)








