#업데이트 및 HTTP 패키지 설치
sudo apt-get install -y ca-certificates curl software-properties-common apt-transport-https gnupg lsb-release
#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
#도커 엔진 설치
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
#설치가능한 버전 확인
sudo apt-cache madison docker-ce
sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
#도커 버전 확인
sudo docker version
#컨테이너 실행
sudo docker run --rm hello-world
'linux' 카테고리의 다른 글
git 설치 (0) | 2025.02.03 |
---|---|
framework 설치 (0) | 2025.02.03 |
composer 설치 (0) | 2025.02.03 |
apache 설치 (0) | 2025.02.03 |
Ajenti 설치 (0) | 2025.02.03 |