Skip to content

Instantly share code, notes, and snippets.

@MeenachiSundaram
Last active January 17, 2017 08:14
Show Gist options
  • Select an option

  • Save MeenachiSundaram/4daf6793b812d24aec2cfe86dc947df1 to your computer and use it in GitHub Desktop.

Select an option

Save MeenachiSundaram/4daf6793b812d24aec2cfe86dc947df1 to your computer and use it in GitHub Desktop.
docker installation in rhel
#!/usr/bin/env bash
set -eux
# Sample custom configuration script - add your own commands here
# to add some additional commands for your environment
#
# For example:
# yum install -y curl wget git tmux firefox xvfb
echo "Installing Updates"
#Installing updates
yum -y update
echo "Installing Packages"
#Installing Packages
yum -y install wget nano emacs vim
echo "Installing Docker Repo"
#Installing Docker Repo
tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
echo "Installing docker-engine"
#Installing docker-engine
yum -y install docker-engine
echo "Installing docker-compose"
#Installing docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.8.1/docker-compose-$(uname -s)-$(uname -m)" > /usr/bin/docker-compose
chmod +x /usr/bin/docker-compose
echo "Installing docker-machine"
#Installing docker-machine
curl -L https://github.com/docker/machine/releases/download/v0.8.2/docker-machine-`uname -s`-`uname -m` > /usr/bin/docker-machine
chmod +x /usr/bin/docker-machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment