AWS docker, docker compose 설치 및 권한 주기 - team-irc/tchatong GitHub Wiki

$ sudo apt-get update

# 디펜던시 추가
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

# public key 등록
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

$ echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

# docker-compose 설치
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.28.6/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# docker permission
$ sudo groupadd docker
$ sudo usermod -aG docker $USER

# docker-compose permission
$ sudo chmod 666 /var/run/docker.sock

110110110
# 설치 확인
$ docker -v
$ docker-compose -v

참고