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
參考課程
隨機文章
- GPhone呼之欲出!Google研發中品牌手機傳在台灣設計-將提供比目前手機功能更強大的網路瀏覽器 (2007-11-06)
- 出錯的花旗信用卡帳單 (2010-09-22)
- 回應一部分網友的留言 (2008-01-14)
- 求知若飢,虛心若愚( Stay Hungry , Stay Foolish ) (2008-03-13)
- Ubuntu 1204上安裝VMware 8.0.4 workstation (2012-08-11)