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
參考課程
隨機文章
- 乳摸:Google 要認真的幹一票了!Gphone 明年降臨? (2007-11-06)
- 時間成本 機會成本 … (2019-05-15)
- 當農夫與偷菜 (2010-01-11)
- 摩托羅拉洋蔥機~超爛UI (2008-06-01)
- Citibank信用卡放在家裡也會有被盜刷風險 (2011-01-07)
![[chatGPT 測試] 評測開箱 Synology DS918+](https://chihping.aflypen.com/wp-content/uploads/2023/03/hdd-g6fc6f0659_640-300x228.png)





![[chatGPT 測試] DSM 7 有什麼特色](https://chihping.aflypen.com/wp-content/uploads/2023/03/usb-ga13f61ece_1280-300x221.jpg)

![[chatGPT 測試] 比較Synolgy TrueNAS 和 OpenMediaVault](https://chihping.aflypen.com/wp-content/uploads/2023/03/synolgo_opensource_comparison-300x169.jpg)