Docker Cookbook


Running a Cloud Provider CLI in a Docker Container | 249



Download 6,31 Mb.
Pdf ko'rish
bet197/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   193   194   195   196   197   198   199   200   ...   260
Bog'liq
Docker Cookbook

8.7 Running a Cloud Provider CLI in a Docker Container | 249


8.8 Using Google Container Registry to Store Your Docker
Images
Problem
You have used a Docker private registry hosted on your own infrastructure (see
Recipe 2.11
) but you would like to take advantage of a hosted service. Specifically, you
would like to take advantage of the newly announced Google container 
registry
.
Other hosted private registry solutions exist, including Docker Hub
Enterprise
 and 
Quay.io
. This recipe does not represent an endorse‐
ment of one versus another.
Solution
If you have not done so yet, go through 
Recipe 8.1
to sign up on Google Cloud Plat‐
form. Then download the Google Cloud CLI and create a project (see 
Recipe 8.3
).
Make sure that you update your 
gcloud
CLI on your Docker host to load the preview
components. You will have access to 
gcloud docker
, which is a wrapper around the
docker
client:
$ gcloud components update
$ gcloud docker help
Usage: docker [OPTIONS] COMMAND [arg...]
A self-sufficient runtime for linux containers.
...
This example creates a 
cookbook
 
project
 on Google Cloud with the project ID 
sylvan-
plane-862
. Your project name and project ID will differ.
As an example, on the Docker host that we are using, we have a 
busybox
image that
we uploaded to the Google Container Registry (GCR). You need to tag the image you
want to push to the GCR so that it follows the namespace naming convention of the
GCR (i.e., 
gcr.io/project_id/image_name
). You can then upload the image with
gcloud docker push
:
$ docker images | grep busybox
busybox latest a9eb17255234 8 months ago 2.433 MB
$ docker tag busybox gcr.io/sylvan_plane_862/busybox
$ gcloud docker push gcr.io/sylvan_plane_862/busybox
The push refers to a repository [gcr.io/sylvan_plane_862/busybox] (len: 1)
Sending image list
Pushing repository gcr.io/sylvan_plane_862/busybox (1 tags)
511136ea3c5a: Image successfully pushed

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   193   194   195   196   197   198   199   200   ...   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