Docker Cookbook


| Chapter 7: The Docker Ecosystem: Tools



Download 6,31 Mb.
Pdf ko'rish
bet163/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   159   160   161   162   163   164   165   166   ...   260
Bog'liq
Docker Cookbook

200 | Chapter 7: The Docker Ecosystem: Tools


1b2c4634fc6d nginx:1.7 ... 443/tcp, 192.168.33.11:80->80/tcp swarm-1...
8399c544b619 nginx:1.7 ... 443/tcp, 192.168.33.12:80->80/tcp swarm-2...
You just started two Nginx containers. Swarm scheduled them on two of the nodes in
the cluster. You can open your browser at 
http://192.168.33.11
 and 
http://
192.168.33.12
and you will see the default Nginx page.
The 
docker run
command can take some time to return. Swarm
needs to schedule the container on a node in the cluster, and that
node needs to pull the Nginx image.
Discussion
In this setup, the Docker Swarm server is running within a local container on the
Swarm head node. You can see it with 
docker ps
and you can check the logs with
docker logs
. In the logs, you see the requests made to start the Nginx containers. It
is interesting to see that you are using the Docker client on the Swarm head node to
communicate with the local Docker daemon and the Swarm server running in a local
container:
$ docker ps
CONTAINER ID IMAGE COMMAND ... PORTS
72acd5bc00de swarm:latest swarm manage ... 2375/tcp, 0.0.0.0:1234->1234/tcp
$ docker logs 72acd5bc00de
... msg="Listening for HTTP" addr="0.0.0.0:1234" proto=tcp
... msg="HTTP request received" method=GET uri="/v1.17/info"
... msg="HTTP request received" method=GET uri="/v1.17/containers/json"
... msg="HTTP request received" method=POST uri="/v1.17/containers/create"
... msg="HTTP request received" method=POST uri="/v1.17/containers/.../start"
... msg="HTTP request received" method=GET uri="/v1.17/containers/json"
... msg="HTTP request received" method=POST uri="/v1.17/containers/create"
... msg="HTTP request received" method=POST uri="/v1.17/containers/.../start"
... msg="HTTP request received" method=GET uri="/v1.17/containers/json"
In these logs, you clearly see the API calls being made to the Swarm server to launch
the Nginx containers in the cluster.

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   159   160   161   162   163   164   165   166   ...   260




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish