-
-
Save inhumantsar/56e7ba7bea6e8a62f57e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! which wget > /dev/null; then | |
yum install -y wget | |
fi | |
export DOCKER_VERSION=1.3.0 | |
pushd /tmp | |
if [ ! -f /usr/bin/docker ]; then | |
# First we install the docker-io package to have us setup all the nasty things | |
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
rpm -ivh epel-release-6-8.noarch.rpm | |
yum --enablerepo epel-testing install -y docker-io | |
fi | |
# Then we override with recent binaries and files | |
wget https://get.docker.com/builds/Linux/x86_64/docker-$DOCKER_VERSION.tgz | |
tar xzf docker-$DOCKER_VERSION.tgz | |
sudo mv usr/local/bin/docker /usr/bin/ | |
wget https://github.com/docker/docker/archive/v$DOCKER_VERSION.tar.gz | |
tar xzf v$DOCKER_VERSION.tar.gz | |
mv docker-$DOCKER_VERSION/contrib/init/sysvinit-redhat/docker /etc/init.d/ | |
mv docker-$DOCKER_VERSION/contrib/init/sysvinit-redhat/docker.sysconfig /etc/sysconfig/docker | |
chkconfig docker on | |
nohup service docker restart | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment