blob: 381a1e7965f22f2955e2fbdc33b8063b5b5bb5bb [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001UBUNTU:=$(shell which apt > /dev/null 2>&1; echo $$?)
2
3ifeq ($(UBUNTU),0)
4
5# ******************* apt-based distros ***************************
6prereqs: /usr/bin/http docker /usr/bin/curl /usr/local/bin/docker-compose
7
8/usr/bin/http:
9 sudo apt-get -y install httpie
10
11/usr/bin/curl:
12 sudo apt-get -y install curl
13
14docker:
15 which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
16 sudo usermod -aG docker $(shell whoami)
17
18else
19
20# ****************** RPM-based distros ******************
21
22# (untested / work-in-progress)
23
24prereqs: /usr/bin/pip /usr/bin/http docker /usr/local/bin/docker-compose
25
26/usr/bin/pip:
27 curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
28 sudo python ./get-pip.py
29
30docker:
31 which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
32 sudo usermod -aG docker $(shell whoami)
33
34/usr/bin/http:
35 sudo pip install httpie
36
37endif
38
39/usr/local/bin/docker-compose:
40 sudo bash -c "curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
41 sudo chmod +x /usr/local/bin/docker-compose
Scott Baker8ed63bb2016-07-07 14:20:08 -070042
43rebuild_docker:
44 stat docker_build || git clone https://github.com/dotcloud/docker.git docker_build
45 sudo make -C docker_build build
46 sudo make -C docker_build binary
47 sudo service docker stop
48 sudo mv /usr/bin/docker /usr/bin/docker-old
49 sudo cp docker_build/bundles/latest/binary-client/docker /usr/bin/
50 sudo cp docker_build/bundles/latest/binary-daemon/dockerd /usr/bin/
51 sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd /usr/bin/
52 sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-shim /usr/bin/
53 sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-ctr /usr/bin/
54 sudo cp docker_build/bundles/latest/binary-daemon/docker-runc /usr/bin/
55 sudo service docker start