[Docker] Amazon Linux 에 Docker & Compose 설치 하기.
Cloud&Container/IaC 2020. 3. 31. 14:06Amazon linux docker & docker-compose 설치)
$ sudo yum update
$ sudo yum install docker
$ docker version
...중략...
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
$ sudo service docker start
$ docker version
Got permission denied while trying to connect to the Docker daemon socket at
unix:///var/run/docker.sock:
Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock:
connect: permission denied
$ sudo docker version
$ sudo usermod -a -G docker ec2-user
# https://github.com/docker/compose 에서 latest version 을 확인 합니다.
$ sudo curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose up
Couldn't connect to Docker daemon at http+docker://localhost - is it running?
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ newgrp docker
$ docker-compose up