It is a memorandum when I installed Docker on EC2 (Amazon Linux2) and tried using it. Normally, I think that I will use a container infrastructure such as ECS or Elastic Beanstalk, so I may not have much opportunity, but I wrote it.
Log in to EC2
$ ssh -i ~/.ssh/****.pem ec2-user@***.***.***.***
install git
$ sudo yum install git -y
Install Docker
$ sudo amazon-linux-extras install docker -y
Start Docker
$ sudo service docker start
If you get an error like ERROR: Could n’t connect to Docker daemon at http + docker: // localhost – is it running?
, Please refer to the article below.
https://qiita.com/u_query/items/14a31721a2870b735938
Recommended Posts