Skip to content

Instantly share code, notes, and snippets.

@jeongukjae
Last active April 12, 2019 01:24
Show Gist options
  • Save jeongukjae/d0c89ef4a5859d4fec6a48a67212caeb to your computer and use it in GitHub Desktop.
Save jeongukjae/d0c89ef4a5859d4fec6a48a67212caeb to your computer and use it in GitHub Desktop.
aws user data to install codedeploy agent, docker and docker compose (ap-northeast-2)
#!/bin/bash
# install code deploy agent
yum -y update
yum install -y ruby
cd /home/ec2-user
curl -O https://aws-codedeploy-ap-northeast-2.s3.amazonaws.com/latest/install
chmod +x ./install
./install auto
# install docker
amazon-linux-extras install -y docker
service docker start
usermod -a -G docker ec2-user
# install docker compose
curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment