서버 환경
- Ubuntu Server 20.04.3 LTS
- vCPU 1 core / RAM 1GB
사전 준비
1. 패키지 버전 업데이트
sudo apt update -y
2. HTTP 패키지 설치
sudo apt-get install -y ca-certificates \
curl \
software-properties-common \
apt-transport-https \
gnupg \
lsb-release
3. GPG 키 및 저장소 추가
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
도커 설치
1. 패키지 버전 업데이트
sudo apt update -y
2. 도커 엔진 설치
sudo apt install docker-ce docker-ce-cli containerd.io
3. 도커 설치 확인
sudo docker version
# Docker 버전 정보
Client: Docker Engine - Community
Version: 24.0.5
API version: 1.43
Go version: go1.20.6
Git commit: ced0996
Built: Fri Jul 21 20:35:23 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.5
API version: 1.43 (minimum version 1.12)
Go version: go1.20.6
Git commit: a61e2b4
Built: Fri Jul 21 20:35:23 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
4. 도커 컴포즈 설치 확인
sudo docker compose version
# Docker Compose 버전 정보
Docker Compose version v2.20.2
'Infra > Docker' 카테고리의 다른 글
[Infra] Docker Compose란? (0) | 2023.08.25 |
---|---|
[Infra] Docker란? (0) | 2023.08.25 |