forked from jonaseck2/freezing-wookie
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinux-docker.sh
executable file
·25 lines (20 loc) · 1.2 KB
/
linux-docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
#installs latest docker, docker-machine and docker-compose
#prerequisites
sudo apt-get update -qqy && sudo apt-get install -qqy curl cgroup-lite apparmor
#docker
curl -s https://get.docker.com/ | sudo sh
sudo usermod -a -G docker `id -g -n` # requires relogin. Need to manually set group docker, "sg docker" until you do.
#Compose
compose_version=`curl -sw %{redirect_url} https://github.com/docker/compose/releases/latest`
compose_version=`echo ${compose_version##*/}`
sudo bash -c "\
curl -sL https://raw.githubusercontent.com/docker/compose/${compose_version}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \
curl -sL https://github.com/docker/compose/releases/download/${compose_version}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose"
#Machine
machine_version=`curl -sw %{redirect_url} https://github.com/docker/machine/releases/latest`
machine_version=`echo ${machine_version##*/}`
sudo bash -c "\
curl -sL https://github.com/docker/machine/releases/download/${machine_version}/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine"