| 1 | #!/bin/bash |
| 2 | [ "$(cat /etc/debian_version | awk -F. {'print $1'})" -ne "8" ] && echo exit 1 |
| 3 | echo "deb https://apt.dockerproject.org/repo debian-jessie main" > \ |
| 4 | /etc/apt/sources.list.d/docker.list && \ |
| 5 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D; \ |
| 6 | aptitude install -y apt-transport-https ca-certificates bridge-utils; \ |
| 7 | aptitude update; \ |
| 8 | aptitude install -y docker-engine && \ |
| 9 | update-rc.d docker enable && \ |
| 10 | sed -i 's/^allow-hotplug eth0/#allow-hotplug eth0/g' /etc/network/interfaces;\ |
| 11 | sed -i 's/^iface eth0 inet/#iface eth0 inet/' /etc/network/interfaces; \ |
| 12 | echo -e "auto br0\niface br0 inet dhcp\n\tbridge_ports eth0\n\tbridge_fd 0\n\tbridge_hello 0\n\tbridge_maxwait 0\n\tbridge_stp off" > /etc/network/interfaces.d/br0_eth0.conf; \ |
| 13 | sed -i '/^#DOCKER_OPTS.*/aDOCKER_OPTS="-b br0"' /etc/default/docker |
waja / gist:b6901b70dc524dd1a1d4d134d9686b9c
Last active 5 months ago
Revision beeb71b5bab4f76b7ecd44d9138c68a5caf779f0