[Blockchain] 블록체인 실습 준비하기(3) - Docker 설치

Docker 설치

아래처럼 하면 된다고 한다.

1
curl -fsSL https://get.docker.com/ | sudo sh

도커를 설치할 땐 이 블로그의 도움을 아주 많이 받았다. 그런데 sudo 권한은 왜 제대로 설정이 안 되는지 모르겠다. (docker 재시작해도 안 됨.)


Docker official GPG key 설정

1
2
3
4
5
6
7
8
9
10
11
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Verify that the key fingerprint is 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.

sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

sudo apt update && sudo apt install docker-ce -y
# Verify that Docker CE or Docker EE is installed correctly by running the hello-world image

사용자에게 도커 명령어 처리 권한 부여는 아래와 같이 하면 된다.

1
sudo usermod -a -G docker 유저이름

설치 확인은 이렇게!

1
sudo docker run hello-world

Docker Compose 설치

주의: 버전에 따라 링크 url이 바뀝니다. 최신 버전 설치는 이 링크를 참고해 주세요.

1
2
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0-rc2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

다음 명령어로 버전 확인이 가능하다.

1
docker-compose --version

업그레이드와 삭제 과정은 소제목 링크를 확인하면 된다.


Share