It is a standard method of installing Docker on Amazon Linux EC2
- Update packages
sudo yum update -y- Install Docker
On Amazon Linux
sudo yum install docker -yOn Amazon Linux 2
sudo amazon-linux-extras install docker- Start the Docker service
sudo service docker startor
sudo systemctl start docker- Enable
dockerserver start on system startup.
sudo systemctl enable docker- Verify that docker is installed correctly by running the hello-world image.
sudo docker run hello-worldNOTE:
- If you are not using
rootuser no need to usesudoin front of commads. - In realtime envirnoment we are not install docker in
Amazon linuxwe had separate containerization services called Amazon Elastic Container Registry (ECR), Amazon Elastic Container Service (ECS), Amazon Elastic Kubernetes Service (EKS) and so on.