k8s-docker-suite-app-murano/DockerStandaloneHost/elements/docker/install.d/56-docker
Dmytro Dovbii 82d6b47ddc Fix DIB elements to allow docker use EnvironmentFile
Closes-Bug: #1590070
Change-Id: I5cd7bcb9b6fc7356a9255e1e05a6a169a054ecf6
2016-09-16 18:52:04 +03:00

15 lines
525 B
Bash
Executable File

#!/bin/bash
set -eu
install-packages curl
curl -sSL https://get.docker.com/ | sh
echo 'DOCKER_OPTS="--bip=172.31.0.1/16 --fixed-cidr=172.31.0.0/16 --mtu=1450"' >> /etc/default/docker
if [[ $(lsb_release -c -s) == 'jessie' ]]; then
# On debian docker ignores /etc/default/docker file
# Modifying docker.service to add reference to config file
sed -i '/Type=notify/a EnvironmentFile=-/etc/default/docker' /lib/systemd/system/docker.service
sed -i 's/fd:\/\//fd:\/\/ $DOCKER_OPTS/g' /lib/systemd/system/docker.service
fi