Skip to content

Instantly share code, notes, and snippets.

@phuongnd08
Last active August 29, 2015 14:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phuongnd08/3660d0874ed0f6407c44 to your computer and use it in GitHub Desktop.
Save phuongnd08/3660d0874ed0f6407c44 to your computer and use it in GitHub Desktop.
Install docker 1.3.0 on CentOS
#!/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
# Then we override with recent binaries and files
wget https://get.docker.com/builds/Linux/x86_64/docker-$DOCKER_VERSION.tgz
tar xzf docker-1.3.0.tgz
sudo mv usr/local/bin/docker /usr/bin/
wget https://github.com/docker/docker/archive/v$DOCKER_VERSION.tar.gz
tar xzf v1.3.0.tar.gz
mv docker-1.3.0/contrib/init/sysvinit-redhat/docker /etc/init.d/
mv docker-1.3.0/contrib/init/sysvinit-redhat/docker.sysconfig /etc/sysconfig/docker
chkconfig docker on
nohup service docker restart
fi
popd
@alapidas
Copy link

alapidas commented Nov 2, 2014

Just a note that this would not work for CentOS 7 due to the switch to systemd

@phuongnd08
Copy link
Author

Right, this one is for CentOS 6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment