본문 바로가기

카테고리 없음

[Docker] Ubuntu 환경에서 docker 설치하기

 

1. ubuntu 패키지 업데이트

sudo apt-get update

 

 

2. 필요한 패키지 설치 

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

 

 

3.도커 공식 GPG 키 추가 

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

 

4. 도커 공식 apt 저장소를 추가 

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

 

5. 시스템 패키지 업데이트 

sudo apt-get update

 

6. docker 설치

sudo apt-get install docker-ce docker-ce-cli containerd.io

 

7. docker 설치 확인 

- 실행 상태 확인 

sudo systemctl status docker

 

- 도커 실행 

sudo docker run hello-world

 

- reference :https://velog.io/@osk3856/Docker-Ubuntu-22.04-Docker-Installation