Docker Compute Engine Ubuntu에서 Docker 설치 방법

by lizard2019 posted Apr 15, 2021
?

Shortcut

PrevPrev Article

NextNext Article

ESCClose

Larger Font Smaller Font Up Down Go comment Print

VM 인스턴스 생성 후

 

1. 유저 등록 및 sudo 설정 (유저 이름은 'USER_NAME')

sudo adduser USER_NAME
sudo usermod -aG sudo USER_NAME
su USER_NAME
sudo ls
exit
su - USER_NAME

2. Docker Repo 설정

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

3.  Docker 설치

sudo apt install -y docker-ce

4. docker-compose 설치

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