82d6b47ddc
Closes-Bug: #1590070 Change-Id: I5cd7bcb9b6fc7356a9255e1e05a6a169a054ecf6
16 lines
526 B
Bash
Executable File
16 lines
526 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
|