Go to EC2
In the connection interface
sudo amazon-linux-extras install docker
sudo service docker start
sudo systemctl enable docker
Add ec2-user to docker group
sudo usermod -a -G docker ec2-user
Then use the following command to check
docker info
docker pull node:16-alpine
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 999999999999.dkr.ecr.ap-southeast-1.amazonaws.com
docker tag node:16-alpine aws-fcj-management:latest 372936203512.dkr.ecr.ap-southeast-1.amazonaws.com/aws-fcj-management:node16-alpine
Then push to ECR
docker push aws-fcj-management:latest 372936203512.dkr.ecr.ap-southeast-1.amazonaws.com/aws-fcj-management:node16-alpine
sudo yum install git
git version