install docker 1 on amazon Linux AMI code example
Example: Amazon Linux 2 AMI install docker
sudo yum update -y
sudo amazon-linux-extras install docker
# Start Docker service
sudo service docker start
sudo yum update -y
sudo amazon-linux-extras install docker
# Start Docker service
sudo service docker start