Amazon Linux 2
Install Docker
# Update AMI yum packages
$ sudo yum update
# Install Docker by yum
$ sudo yum install docker
# add docker group to ec2-user
$ sudo usermod -a -G docker ec2-user
$ id ec2-user
Install docker-compose
$ wget https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)
$ sudo mv docker-compose-$(uname -s)-$(uname -m) /usr/local/bin/docker-compose
$ sudo chmod -v +x /usr/local/bin/docker-compose
Configure docker service
# start service at boot
$ sudo systemctl enable docker.service
# start service now
$ sudo systemctl start docker.service
Top comments (0)