Docker Cookbook



Download 6,31 Mb.
Pdf ko'rish
bet140/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   136   137   138   139   140   141   142   143   ...   260
Bog'liq
Docker Cookbook

Discussion
Although you can start a single instance of CoreOS via Vagrant by cloning the Git
repository and using 
vagrant up
, you will notice two files, 
config.rb.sample
and 
user-
data.sample
. These files allow you to configure a cluster of CoreOS instances (see
Recipe 6.3
) and set up services at boot time. They are read by Vagrant in the Vagrant‐
file:
CLOUD_CONFIG_PATH
=
File
.
join
(
File
.
dirname
(
__FILE__
),
"user-data"
)
CONFIG
=
File
.
join
(
File
.
dirname
(
__FILE__
),
"config.rb"
)
6.1 Discovering the CoreOS Linux Distribution with Vagrant | 171


For example, to allow you to connect remotely to the Docker service running in the
CoreOS instance started, copy 
config.rb.sample
to 
config.rb
and copy 
user-data.sample
to 
user-data
. Then edit 
config.rb
to uncomment the 
$expose_docker_tcp=2375
line:
$ cp config.rb.sample config.rb
$ cp user-data.sample user-data
$ tree
.
├── CONTRIBUTING.md
├── MAINTAINERS
├── README.md
├── Vagrantfile
├── config.rb
├── config.rb.sample
├── user-data
└── user-data.sample
0 directories, 8 files
$ vi config.rb #uncomment $expose_docker_tcp=2375
$ vagrant up
If you still have the CoreOS instance running from the instructions
in the solution section of this recipe, provision the instance again
with the 
vagrant reload --provision
command or destroy it
with 
vagrant destroy
and bring it back up again with
vagrant up
.
Vagrant, which configures a NAT and a host-only interface for the CoreOS instance,
will forward port 2375 on the NAT interface, which will allow you to access Docker
on your localhost:
$ docker -H tcp://127.0.0.1:2375 ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
See Also
• CoreOS 
documentation
Discussion of Docker containers versus the CoreOS-specific
Rocket
is beyond the scope of this cookbook. Rocket is an imple‐
mentation of the App Container 
specification
 proposed by CoreOS.
Recipe 4.6
discusses the effort of the Open Container Initiative,
which brings these two container formats together.

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   136   137   138   139   140   141   142   143   ...   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