ucsmy@qktest21190:~$ Docker pull Daocloud.io/ubuntu
Using default tag:latest
latest:pulling from Ubuntu
22ecafbbcc4a:pulling FS Layer
580435e0a086:pulling FS layer
8321ffd10031:downloading [===================== =============================>] 519 b/519 B
08b8f28a13c2:waiting
2b401702069a:waiting
Write/ Home/ucsmy/workspace/docker/tmp/getimageblob518547788:no space left on device
Download the Ubuntu image and use df-h to view all of the space directory's disks in case of low disk space
ucsmy@qktest21190:~$ df-h
Filesystem Size used Avail use% mounted on
udev 7.9G 4.0K 7.9G 1%/dev
tmpfs 1.6G 920K 1.6G 1%/run
/dev/sda4 57G 19G 36G 34%/
None 4.0K 0 4.0K 0%/sys/fs/cgroup
none 5.0M 0 5.0M 0%/run/lock
None 7.9G 1.4M 7.9G 1%/run/shm
none 100M 0 100M 0%/run/user
/dev/sda1 453M 40M 386M 10%/boot
/dev/sda5 14G 148M 13G 2%/var/log
/dev/sda6 4.5G 78M 4.2G 2%/tmp
/dev/mapper/ Vgdata-lvdata 197G 197G 0 100%/home/ucsmy/workspace
After the download image is successful, view
ucsmy@qktest21191:~$ Docker Images REPOSITORY TAG IMAGE ID CREATED SIZE dev-v P2-c702278d06717bb8f41b4866ec8c617fc9b0d222738ff40b680420844dc10a66e845cc321fb4ac46e9f695a31f92acb4f9448be21ca1071bf549bd 05740F416C latest 1dd23285f460 5 weeks ago 1.38 GB dev-vp3-c702278d06717bb8f41b4866e c8c617f C9B0D222738FF40B680420844DC10A66E845CC321FB4AC46E9F695A31F92ACB4F9448BE21CA1071BF549BD05740F416C Latest FF7 0565DC2D2 5 weeks ago 1.38 GB Cello-watchdog Latest 06510d23fba6 9 weeks ago 709.4 MB Cello-dashboard Latest e90cb34ea002 9 weeks ago 709.4 MB Cello-restserver Latest E806541AA5A1 9 weeks ago 709.4 MB Daocloud.io/ubuntu Latest EBCD9D4FCA80 weeks ago 117.9 MB
You can see, then create the container with this Ubuntu image and then automatically enter the container after the creation is successful.
ucsmy@qktest21191:~$ Docker run-it--name ubuntublock-p 80:80 ebcd9d4fca80
root@f2b5cdfdc5ed:/#
-it is to run the container in interactive mode, and reassign a pseudo-input terminal to the container, simple point is to create and enter the container, you can enter the command line that
–name is to add a new name to the container.
-P Port Correspondence
EBCD9D4FCA80 is the image ID of the Daocloud.io/ubuntu image
Press the shortcut key CTRL + P + Q to exit the container and reconnect
ucsmy@qktest21191:~$ Docker Attach Ubuntublock
It's like a real ubunt in here.
You can run Setup Manager to install all of your desired commands,
such as installing Git
Apt-get Install git