Switch Ubuntu to overlay2 docker driver
With 4.4 kernel we can use the improved overlay2 driver instead of btrfs for significantly better performance when creating layers. Change-Id: I0b84a2b34fdb71c07798d94b546d3105a2742321 Related-Id: I3b0dfd6db5298dfb34ec160eed910ca76feeb423
This commit is contained in:
parent
6a8a9f7ba4
commit
fc2bb3f37f
@ -57,11 +57,12 @@ source /etc/lsb-release
|
|||||||
echo "deb http://apt.dockerproject.org/repo ubuntu-${DISTRIB_CODENAME} main" | sudo tee /etc/apt/sources.list.d/docker.list
|
echo "deb http://apt.dockerproject.org/repo ubuntu-${DISTRIB_CODENAME} main" | sudo tee /etc/apt/sources.list.d/docker.list
|
||||||
add_key
|
add_key
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install --no-install-recommends docker-engine btrfs-tools
|
sudo apt-get -y install --no-install-recommends docker-engine
|
||||||
|
|
||||||
sudo service docker stop
|
sudo service docker stop
|
||||||
setup_disk
|
|
||||||
if [[ ${DISTRIB_CODENAME} == "trusty" ]]; then
|
if [[ ${DISTRIB_CODENAME} == "trusty" ]]; then
|
||||||
|
sudo apt-get -y install --no-install-recommends btrfs-tools
|
||||||
|
setup_disk
|
||||||
echo 'DOCKER_OPTS="-s btrfs"' | sudo tee /etc/default/docker
|
echo 'DOCKER_OPTS="-s btrfs"' | sudo tee /etc/default/docker
|
||||||
sudo mount --make-shared /run
|
sudo mount --make-shared /run
|
||||||
sudo service docker start
|
sudo service docker start
|
||||||
@ -70,7 +71,7 @@ else
|
|||||||
sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
|
sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/dockerd --storage-driver btrfs
|
ExecStart=/usr/bin/dockerd --storage-driver overlay2
|
||||||
MountFlags=shared
|
MountFlags=shared
|
||||||
EOF
|
EOF
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
Loading…
Reference in New Issue
Block a user