Docker Cookbook


See Also • Documentation of  docker=py • Docker article on HTTPS  support 4.12 Changing the Storage Driver



Download 6,31 Mb.
Pdf ko'rish
bet110/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   106   107   108   109   110   111   112   113   ...   260
Bog'liq
Docker Cookbook

See Also
• Documentation of 
docker=py
• Docker article on HTTPS 
support
4.12 Changing the Storage Driver
Problem
You would like to use a different storage driver than the default used on your system
during Docker installation.
Solution
This recipe illustrates how to change the storage backend used by Docker. You will
start from a Ubuntu 14.04 installation with a 3.13 kernel and a Docker 1.7 setup with
Another Union File System (AUFS), and you will switch to the overlay filesystem. As
before, you can grab a Vagrantfile from the repository that comes with this book. Let’s
do it:
$ git clone https://github.com/how2dock/docbook.git
$ cd docbook/ch04/overlay
$ vagrant up
$ vagrant ssh
$ uname -r
3.13.0-39-generic
126 | Chapter 4: Docker Configuration and Development


$ docker info | grep Storage
Storage Driver: aufs
$ docker version | grep Server
Server version: 1.7.0
The overlay filesystem is available in the Linux kernel starting with 3.18. Therefore to
switch storage backends, you first need to 
upgrade
the kernel of your machine to 3.8
and restart:
$ cd /tmp
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-vivid/\
linux-headers-3.18.0-031800-generic_3.18.0-031800.201412071935_amd64.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-vivid/\
linux-headers-3.18.0-031800_3.18.0-031800.201412071935_all.deb
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-vivid/\
linux-image-3.18.0-031800-generic_3.18.0-031800.201412071935_amd64.deb
$ sudo dpkg -i linux-headers-3.18.0-*.deb linux-image-3.18.0-*.deb
$ sudo update-grub
$ sudo shutdown -r now
Once the machine has restarted, connect to it again. You can now edit the Docker
configuration file and specify Overlay as a storage driver by using the 
-s
option in
starting the Docker daemon:
$ uname -r
3.18.0-031800-generic
$ sudo su
# service docker stop
# echo DOCKER_OPTS=\"-s overlay\" >> /etc/default/docker
# service docker start
You now switch the storage backend for Docker:
$ docker info | grep Storage
Storage Driver: overlay
AUFS has been the default storage backend for 3.13–3.16 kernels,
especially on Ubuntu systems. Overlay is now in the upstream ker‐
nel starting with 3.18, and AUFS is not available. Consider switch‐
ing to Overlay.
Discussion
Docker can use multiple storage backends to store images and container filesystems.
The storage abstraction in Docker tries to minimize the space used by images and
container filesystems by keeping them in layers and tracking only the modifications
from layer to layer. It relies on union-based filesystems to accomplish this.
You can choose between the following storage backends:

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   106   107   108   109   110   111   112   113   ...   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