Docker Cookbook


Using Project Atomic to Run Docker Containers



Download 6,31 Mb.
Pdf ko'rish
bet149/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   145   146   147   148   149   150   151   152   ...   260
Bog'liq
Docker Cookbook

6.6 Using Project Atomic to Run Docker Containers
Problem
You are looking for an operating system alternative to CoreOS, Ubuntu, Snappy, and
RancherOS.
Solution
Use Project 
Atomic
. Atomic is sponsored by Red Hat and inspired by the RHEL and
CentOS distribution. It is based on CentOS 7, and like CoreOS, Ubuntu, Snappy, and
RancherOS, it is aimed at providing a Docker-optimized Linux distribution, where
applications are deployed as containers. Atomic upgrades are done through a system
182 | Chapter 6: Optimized Operating System Distributions for Docker


called 
rpm-ostree
. Once an upgrade is available, a reboot installs the new upgrade,
which can also be rolled back.
You can try Atomic by using the CentOS 
builds
. You have the choice of downloading
an ISO, a 
qcow2
image for use in a kernel-based virtual machine (KVM), or a Vagrant
box. (The Vagrant box for VirtualBox may not be the latest Atomic build and will
require an upgrade.)
As usual in this book, to make things easy, I prepared a Vagrantfile for you:
$bootstrap
=<<
SCRIPT
gpasswd
-
a
vagrant
root
SCRIPT
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION
=
"2"
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
# Every Vagrant virtual environment requires a box to build off of.
config
.
vm
.
box
=
"atomic"
config
.
vm
.
box_url
=
"http://buildlogs.centos.org/rolling/7/isos/x86_64/\
CentOS-7-x86_64-AtomicHost-Vagrant-VirtualBox.box"
config
.
vm
.
provider
"virtualbox"
do
|
vb
,
override
|
vb
.
customize
[
"modifyvm"
,
:id
,
"--memory"
,
"2048"
]
end
config
.
vm
.
network
:forwarded_port
,
host
:
9090
,
guest
:
9090
config
.
vm
.
provision
:shell
,
inline
:
$bootstrap
end
With 
Vagrant
installed, you can just 
vagrant up
and you will be able to 
ssh
into an
atomic host. Clone the repository that comes with this book and you will have the
preceding Vagrantfile:
$ git clone https://github.com/how2dock/docbook
$ cd dockbook/ch06/atomic
$ vagrant up
$ vagrant ssh
Once on the Atomic machine, you will have Docker already installed. You can
explore the host with the 
atomic
command and perform an upgrade with 
sudo
atomic host upgrade
.

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   145   146   147   148   149   150   151   152   ...   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