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
參考課程
隨機文章
- php與mysql套件問題,影響wordpress 運作 (2010-03-01)
- 情比金堅~妻病夫不離棄 再披婚紗慶金婚 (2007-10-31)
- 微軟的One Note取代 evernote 還有一段路要走 (2018-10-08)
- 百貨週年慶 各家優惠比較 (2007-11-21)
- 國泰世華支票出包燒到我~靠北邊走 (2011-03-10)





![[chatGPT 測試] 評測開箱 Synology DS918+](https://chihping.aflypen.com/wp-content/uploads/2023/03/hdd-g6fc6f0659_640-300x228.png)


