Tuesday, December 23, 2014

docker how to

unlike lxc, docker is focus on application, so after pull the images, the application is ready to use. 

1- pull images
$ sudo docker.io pull ubuntu

2- list all images that we currently have

$sudo docker.io images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              15.04               6810a8f874dd        7 days ago          116.9 MB
ubuntu              vivid               6810a8f874dd        7 days ago          116.9 MB
ubuntu              utopic              faf7a9358af7        7 days ago          199.2 MB
ubuntu              14.10               faf7a9358af7        7 days ago          199.2 MB
ubuntu              trusty              04c5d3b7b065        7 days ago          192.7 MB
ubuntu              14.04.1             04c5d3b7b065        7 days ago          192.7 MB
ubuntu              latest              04c5d3b7b065        7 days ago          192.7 MB
ubuntu              14.04               04c5d3b7b065        7 days ago          192.7 MB
ubuntu              12.04               f7653ea50b9b        7 days ago          130.3 MB
ubuntu              12.04.5             f7653ea50b9b        7 days ago          130.3 MB
ubuntu              precise             f7653ea50b9b        7 days ago          130.3 MB
centos              centos5             6cc180b1c73b        2 weeks ago         466.9 MB
centos              centos6             25c5298b1a36        2 weeks ago         215.8 MB
centos              centos7             34943839435d        2 weeks ago         224 MB
centos              latest              34943839435d        2 weeks ago         224 MB
ubuntu              12.10               c5881f11ded9        6 months ago        172.2 MB
ubuntu              quantal             c5881f11ded9        6 months ago        172.2 MB
ubuntu              raring              463ff6be4238        6 months ago        169.4 MB
ubuntu              13.04               463ff6be4238        6 months ago        169.4 MB
ubuntu              saucy               195eb90b5349        6 months ago        184.7 MB
ubuntu              13.10               195eb90b5349        6 months ago        184.7 MB
ubuntu              lucid               3db9c44f4520        8 months ago        183 MB
ubuntu              10.04               3db9c44f4520        8 months ago        183 MB


3- start the docker image

$ sudo docker.io run -t -i ubuntu:15.04 /bin/bash



There are many many images available for pull, such mongo, nginx, redis, and ....
https://registry.hub.docker.com/


The down side is, it's required high internet speed to download image+header

No comments:

Post a Comment