sudo su
yum update
yum install docker
systemctl enable docker.service
systemctl start docker.service
$ aws configure
 AWS Access Key ID [*************xxxx]: <Your AWS Access Key ID>
 AWS Secret Access Key [**************xxxx]: <Your AWS Secret Access Key>
 Default region name: [us-east-2]: us-east-2
 Default output format [None]: json
aws ecr get-login-password --region us-west-1 | docker login --username AWS --password-stdin 963675165738.dkr.ecr.us-west-1.amazonaws.com
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=har-image&target=&ulimits=null&version=1": dial unix /var/run/docker.sock: connect: permission denied