AWS EC2에 Docker-compose 설치하기

환경

  • Amazon Linux

yum upgrade

1
sudo yum -y upgrade

git install

1
sudo yum install git 

docker & docker-compose install

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# docker
sudo yum -y install docker
docker -v

# docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

# docker run
sudo service docker start
sudo usermod -aG docker $USER

docker-compose permission denied solution

1
2
3
4
5
6
7
ls -al /var/run/docker.sock
-> srw-rw----. 1 root docker 0 11월 23 17:15 /var/run/docker.sock

sudo chmod 666 /var/run/docker.sock

ls -al /var/run/docker.sock
srw-rw-rw-. 1 root docker 0 11월 23 17:15 /var/run/docker.sock
Hugo로 만듦
JimmyStack 테마 사용 중