Skip to content

Instantly share code, notes, and snippets.

@Franco-Poveda
Created August 29, 2017 05:11
Show Gist options
  • Save Franco-Poveda/9195d17b9c5e9da491764a301671d0f5 to your computer and use it in GitHub Desktop.
Save Franco-Poveda/9195d17b9c5e9da491764a301671d0f5 to your computer and use it in GitHub Desktop.
Simple bash script to auto-install docker && docker-compose @ centos7
#!/usr/bin/env bash
# Check for sudo:
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Install Docker CE:
yum -y install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y makecache fast
yum -y install docker-ce
systemctl start docker
# Install docker-compose:
pip install --upgrade pip
pip install docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment