Added swarm

This commit is contained in:
Guillem Hernandez Sola
2018-06-13 14:46:19 +02:00
parent 75f631d93f
commit bf79d66aa6
3 changed files with 81 additions and 0 deletions

25
swarm/docker_install.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -eux
apt-get update
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
software-properties-common \
python-minimal zip python-simplejson \
gnupg2 \
software-properties-common
apt-get remove docker docker-engine docker.io
# install docker
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
# install docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
# install docker-machine
curl -L "https://github.com/docker/machine/releases/download/v0.15.0/docker-machine-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine
apt-get -y install linux-image-extra-$(uname -r)
usermod -aG docker vagrant
echo 'DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"' >> /etc/default/docker
service docker restart