16. HelloWorld
$ time docker run debian echo "hello world"
Unable to find image 'debian:latest' locally
debian:latest: The image you are pulling has been verified
1aeada447715: Pull complete
479215127fa7: Pull complete
511136ea3c5a: Already exists
Status: Downloaded newer image for debian:latest
hello world
real 0m15.250s
user 0m0.050s
sys 0m0.027s
16
# 外部レジストリからイメージをダウンロードしてきた場合
17. HelloWorld
$ time docker run debian echo "hello world"
hello world
real 0m0.169s
user 0m0.009s
sys 0m0.010s
17
# 最新イメージのキャッシュがローカルに存在する場合
18. イメージサイズ
18
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
postgres latest 2389997c2ef2 3 days ago 213.3 MB
nginx latest 90081fa15a0c 3 days ago 91.62 MB
mysql latest 335228ceb173 3 days ago 282.6 MB
debian latest 4d6ce913b130 8 days ago 84.98 MB
centos latest 8efe422e6104 2 weeks ago 210 MB
fedora latest 834629358fe2 3 weeks ago 241.3 MB
busybox latest 4986bf8c1536 3 weeks ago 2.433 MB
ubuntu latest ed5a78b7b42b 4 weeks ago 188.3 MB
70. Dockerコミュニティの規模
• 40,000,000+ Docker Container download
• 75,000+ repogitories on DockerHub
• 150+ Meetup Groups in 50+ countries
• 900+ contributors
• 50,000+ third-party projects on GitHub
• 100+ user-generated case studies available from companies
70
https://www.docker.com/company
102. Networkネームスペースの分離
102
# ip addr show | egrep "UP|inet"
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
inet 153.120.104.254/24 brd 153.120.104.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
inet 192.168.0.1/24 brd 192.168.0.255 scope global eth1
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
inet 172.17.42.1/16 scope global docker0
$ docker run -it ubuntu /bin/bash
root@8fbffca705a2:/# ip addr show | egrep "UP|inet"
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
inet 127.0.0.1/8 scope host lo
17: eth0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
inet 172.17.0.4/16 scope global eth0