Created
June 21, 2019 14:20
-
-
Save get-data-/c14bd3e29af7ce991828ec6a00f7afea to your computer and use it in GitHub Desktop.
Install Code Deploy, Docker, and Docker-Compose to a fresh EC2 instance
This file contains hidden or 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 | |
sudo apt-get -y update | |
sudo apt-get -y install ruby | |
sudo apt-get -y install wget | |
cd /home/ubuntu | |
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install | |
sudo chmod +x ./install | |
sudo ./install auto | |
# update the packages index | |
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
# Import the repository’s GPG key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# set up the stable repository | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get -y update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
sudo apt-get install -y jq | |
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) | |
DESTINATION=/usr/local/bin/docker-compose | |
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION | |
sudo chmod 755 $DESTINATION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment