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
參考課程
隨機文章
- 小米路由3當BT下載站 效能不好啊 (2017-03-19)
- 高鐵自肥 讓員工享有超低票價 又說這是強化服務 (2013-06-25)
- 每個行銷長才都該懂的部落格經營手法 (2011-09-27)
- 做半套的skype免費0800功能 (2013-03-15)
- 還沒有準備好的7-WiFi? (2012-05-21)