Last active
December 6, 2022 11:45
-
-
Save iamdylanngo/72a3521ebecbad373d1051333a79177f to your computer and use it in GitHub Desktop.
install-docker-compose-aws-user-data
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
#!/bin/bash | |
# Support ubuntu 20.04 lts | |
# Install docker | |
apt-get update | |
apt-get install -y \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
apt-get update | |
apt-get install -y docker-ce docker-ce-cli containerd.io | |
usermod -aG docker ubuntu | |
# Install docker-compose | |
sudo apt-get install docker-compose-plugin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment