blob: 381a1e7965f22f2955e2fbdc33b8063b5b5bb5bb [file] [log] [blame]
UBUNTU:=$(shell which apt > /dev/null 2>&1; echo $$?)
ifeq ($(UBUNTU),0)
# ******************* apt-based distros ***************************
prereqs: /usr/bin/http docker /usr/bin/curl /usr/local/bin/docker-compose
/usr/bin/http:
sudo apt-get -y install httpie
/usr/bin/curl:
sudo apt-get -y install curl
docker:
which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker $(shell whoami)
else
# ****************** RPM-based distros ******************
# (untested / work-in-progress)
prereqs: /usr/bin/pip /usr/bin/http docker /usr/local/bin/docker-compose
/usr/bin/pip:
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python ./get-pip.py
docker:
which docker > /dev/null || wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker $(shell whoami)
/usr/bin/http:
sudo pip install httpie
endif
/usr/local/bin/docker-compose:
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"
sudo chmod +x /usr/local/bin/docker-compose
rebuild_docker:
stat docker_build || git clone https://github.com/dotcloud/docker.git docker_build
sudo make -C docker_build build
sudo make -C docker_build binary
sudo service docker stop
sudo mv /usr/bin/docker /usr/bin/docker-old
sudo cp docker_build/bundles/latest/binary-client/docker /usr/bin/
sudo cp docker_build/bundles/latest/binary-daemon/dockerd /usr/bin/
sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd /usr/bin/
sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-shim /usr/bin/
sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-ctr /usr/bin/
sudo cp docker_build/bundles/latest/binary-daemon/docker-runc /usr/bin/
sudo service docker start