Created
October 22, 2020 13:46
-
-
Save rh917/26f0e355d3a380cbc7e9086d43202d9f 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
update_system() | |
{ | |
sudo yum check-update -y && sudo yum update -y | |
} | |
install_dependencies(){ | |
if grep "(Amazon Linux*)\w+" /etc/os-release; then | |
sudo amazon-linux-extras install epel -y | |
else | |
yum install -y epel-release | |
fi | |
sudo yum install -y nano wget perl curl nfs-utils bind-utils python python-devel open-vm-tools ntp git unzip zip htop | |
} | |
install_docker(){ | |
sudo amazon-linux-extras install docker -y | |
sudo yum install -y docker-compose | |
sudo service docker start | |
sudo chkconfig docker on | |
} | |
# setup docker to execute without sudo | |
group_mod(){ | |
sudo usermod -a -G docker ec2-user | |
} | |
verify_docker(){ | |
docker info | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment