반응형
우분투 환경에 Docker & Docker Compose 설치 방법을 정리한다.
작성일 : 2025-04-22
OS : Ubuntu 24.04.2 LTS
<1> Uninstall old version
sudo apt-get remove docker docker-engine docker.io containerd runc
<2> Set up the repository
# package index update
sudo apt-get update
# install require package
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
# add GPG key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# set up repository
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
<3> Install Docker
sudo apt-get update
# 설정된 저장소에서 설치가능한 목록확인
sudo apt-cache madison docker-ce
------------------------------------------------------------------------
docker-ce | 5:28.1.1-1~ubuntu.24.04~noble | https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:28.1.0-1~ubuntu.24.04~noble | https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:28.0.4-1~ubuntu.24.04~noble | https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:28.0.3-1~ubuntu.24.04~noble | https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:28.0.2-1~ubuntu.24.04~noble | https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:28.0.1-1~ubuntu.24.04~noble | https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:28.0.0-1~ubuntu.24.04~noble | https://download.docker.com/linux/ubuntu noble/stable amd64 Packages
--------------------------------------------------------------------------
# 특정 버전으로 설치
sudo apt-get install docker-ce=5:28.1.1-1~ubuntu.24.04~noble docker-ce-cli=5:28.1.1-1~ubuntu.24.04~noble containerd.io docker-compose-plugin
<4> docker compose 설치
# 설치가능 버전을 확인
sudo apt-cache policy docker-compose
# --------------------------------------------
docker-compose:
Installed: (none)
Candidate: 1.29.2-6ubuntu1
Version table:
1.29.2-6ubuntu1 500
500 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
# --------------------------------------------
# 특정버전의 docker-compose 설치
sudo apt install docker-compose=1.29.2-6ubuntu1 -y
<5> 설치 확인
docker --version
반응형
'Setting' 카테고리의 다른 글
[Setting | Ubuntu] 계정에 sudo 권한 부여 (0) | 2025.04.24 |
---|---|
[Setting | Ubuntu] 설치 및 기본설정 (0) | 2025.04.17 |
[Setting | AWS] Disk 용량 추가 (0) | 2025.03.30 |
[Setting | AmazonLinux] Docker Compose Install (0) | 2025.03.24 |
[Setting | AmazonLinux] Docker Install (0) | 2025.03.24 |