Docker Cookbook


Part Tag Installed Available Fingerprint Active



Download 6,31 Mb.
Pdf ko'rish
bet153/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   149   150   151   152   153   154   155   156   ...   260
Bog'liq
Docker Cookbook


Part Tag Installed Available Fingerprint Active
ubuntu-core edge 141 142 7f068cb4fa876c *
All that is left is to install the Docker Snappy framework and you can start running
containers:
$ snappy search docker
Part Version Description
188 | Chapter 6: Optimized Operating System Distributions for Docker


docker 1.3.2.007 The docker app deployment mechanism
$ sudo snappy install docker
docker 4 MB [===============] OK
Part Tag Installed Available Fingerprint Active
docker edge 1.3.2.007 - b1f2f85e77adab *
$ docker pull ubuntu:14.04
ubuntu:14.04: The image you are pulling has been verified
511136ea3c5a: Pull complete
3b363fd9d7da: Pull complete
607c5d1cca71: Pull complete
f62feddc05dc: Pull complete
8eaa4ff06b53: Pull complete
Status: Downloaded newer image for ubuntu:14.04
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu 14.04 8eaa4ff06b53 9 days ago 192.7 MB
The script used is a simple Python script that uses Libcloud. It assumes you have set
your AWS keys as environment variables in 
AWSAccessKeyId
and 
AWSSecretKey
. It
starts an instance in the 
eu_west_1
availability zone with the 
m3.medium
instance
type. The user data is made of the content of the 
cloud.cfg
file, which allows SSH
access. Finally, the script sets the SSH key pair to 
snappy
(you will need to have cre‐
ated this key ahead of running the script, and stored the private key in 
~/.ssh/
id_rsa_snappy
):
#!/usr/bin/env python
import
os
from
libcloud.compute.types
import
Provider
from
libcloud.compute.providers
import
get_driver
ACCESS_ID
=
os
.
getenv
(
'AWSAccessKeyId'
)
SECRET_KEY
=
os
.
getenv
(
'AWSSecretKey'
)
IMAGE_ID
=
'ami-20f34b57'
SIZE_ID
=
'm3.medium'
cls
=
get_driver
(
Provider
.
EC2_EU_WEST
)
driver
=
cls
(
ACCESS_ID
,
SECRET_KEY
)
sizes
=
driver
.
list_sizes
()
images
=
driver
.
list_images
()
size
=
[
s

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   149   150   151   152   153   154   155   156   ...   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