Docker Cookbook


| Chapter 2: Image Creation and Sharing



Download 6,31 Mb.
Pdf ko'rish
bet62/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   58   59   60   61   62   63   64   65   ...   260
Bog'liq
Docker Cookbook

66 | Chapter 2: Image Creation and Sharing


 ---> 9bd07e480c5b
Step 1 : RUN apt-get update
---> Using cache
---> e659c9e9ba21

Removing intermediate container 05c13744c7bf
Step 8 : CMD python /tmp/hello.py
---> Running in 124cd2ada52d
---> 9a50c7b2bee9
Removing intermediate container 124cd2ada52d
Successfully built 9a50c7b2bee9
[master 9c38962] fixing hook
1 file changed, 1 insertion(+), 1 deletion(-)
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
flask 9c38962 9a50c7b2bee9 5 days ago 354.6 MB
Although this works nicely and is achieved with two lines of bash, if the build were to
take a long time, it would not be practical to build the image as a post-commit task. It
would be better to use the post-commit hook to trigger a remote build and then reg‐
ister this image in a private repo.
Discussion
For example, you could use a Git hook to trigger an image build on one of your Jen‐
kins servers and then let Jenkins push the new image to your private repository.
2.14 Using Conduit for Continuous Deployment
Problem
You know how to set up an automated build (see 
Recipe 2.12
) on Docker Hub but
would like to set up a hook so that when the build completes, the new image is
deployed automatically on a Docker host.
Solution
Docker Hub features 
webhooks
 that are called when a successful push to a Docker
Hub repository has been made.
The webhook is an HTTP POST request that will be sent to a defined endpoint. Pro‐
cessing this HTTP request and parsing the payload allows the endpoint to pull the
image and potentially start a new container. Webhooks in Docker Hub can also be
chained to trigger multiple events.
Chaining webhooks can be used to build continuous integration and continuous
deployment pipelines. A development team will make changes to the source code of
their applications (e.g., on GitHub); if the source code contains a Dockerfile and an

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   58   59   60   61   62   63   64   65   ...   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