Docker Cookbook


| Chapter 6: Optimized Operating System Distributions for Docker



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

186 | Chapter 6: Optimized Operating System Distributions for Docker


$ apt-get update
Ubuntu Core does not use apt-get, see 'snappy --help'!
$ snappy --help
...
Commands:
{info,versions,search,update-versions,update,
rollback,install,uninstall,tags,build,chroot,
framework,fake-version,nap}
info
versions
search
update-versions
update
rollback undo last system-image update.
install
uninstall
tags
build
chroot
framework
...
$ snappy versions
Part Tag Installed Available Fingerprint Active
ubuntu-core edge 140 142 184ad1e863e947 *
To get Docker running, you need to install a so-called 
snappy
framework. Search for
the Docker framework and install it like so:
$ snappy search docker
Part Version Description
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 *
$ snappy versions
Part Tag Installed Available Fingerprint Active
ubuntu-core edge 140 142 184ad1e863e947 *
docker edge 1.3.2.007 - b1f2f85e77adab *
You can now use Docker on Ubuntu Snappy:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Enjoy running Docker on Ubuntu Snappy.
See Also
• Snappy 
announcement
• Command-line 
walk-through
6.8 Running Docker on Ubuntu Core Snappy in a Snap | 187


6.9 Starting an Ubuntu Core Snappy Instance on AWS EC2
Problem
You have a taste of Ubuntu Snappy with Vagrant (see 
Recipe 6.8
), but you would like
to start a Snappy instance in a public cloud, especially AWS EC2.
Solution
This is an advanced recipe that assumes some knowledge of Ama‐
zon AWS. Although all steps are provided, you might want to read
Programming Amazon Web Services
by James Murty before trying
this recipe out.
As prerequisites, you will need the following:
• An account on 
AWS
• A set of access and secret 
API keys
• A default AWS security group with in-bound SSH allowed
• An SSH key pair called 
snappy
• A host with 
Apache Libcloud
 installed (
sudo pip install apache-libcloud
)
To make this as easy as possible, I am providing a Python script that uses Apache Lib‐
cloud to start an instance on Amazon EC2. Libcloud is an API wrapper that abstracts
the differences in API in various cloud providers. The same script can be slightly
modified to start Snappy instances on most cloud providers. Assuming you have all
the prerequisites, you should be able to do the following:
$ git clone https://github.com/how2dock/docbook
$ cd ch06/snappy-cloud
$ ./ec2snappy.py
54.154.68.31
Once the instance is running, you can 
ssh
to it and check the Snappy version:
$ ssh -i ~/.ssh/id_rsa_snappy ubuntu@54.154.68.31
$ snappy versions
Download 6,31 Mb.

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