Last active
November 7, 2023 15:01
-
-
Save 24HOURSMEDIA/52b3f516ee1427437b6f52b9b65ac969 to your computer and use it in GitHub Desktop.
AWS AMI 2023 Add docker and docker compose plugin
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 | |
set -e | |
set -o pipefail | |
# Install docker and docker compose plugin on AWS Linux AMI 2023 | |
# Defaults to compose plugin for intel machines | |
# Run this with: | |
# bash <(curl -sL https://gist.githubusercontent.com/24HOURSMEDIA/52b3f516ee1427437b6f52b9b65ac969/raw/install-docker-x86.sh?_cb=$(date +%s)) | |
DOCKER_RPM=${DOCKER_RPM:-https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-compose-plugin-2.6.0-3.el7.x86_64.rpm} | |
RPM_DIR=${RPM_DIR:-/tmp} | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
sudo curl -L ${DOCKER_RPM} -o ${RPM_DIR}/compose-plugin.rpm | |
sudo yum install ${RPM_DIR}/compose-plugin.rpm -y | |
docker --version | |
docker compose version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment