우분투에 Docker 설치하기

Hannana·2024년 10월 10일

ec2-Ubuntu 24.04.1 LTS 환경에서 프로젝트 배포를 위해 도커 설치부터 시작

우분투 시스템 패키지 업데이트

sudo apt-get update

필요한 패키지 설치

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

Docker의 공식 GPG키를 추가

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

Docker의 공식 apt 저장소를 추가

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

시스템 패키지 업데이트

sudo apt-get update

Docker 설치

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

Docker 설치 및 상태 확인

sudo systemctl status docker

도커 실행

sudo docker run hello-world
profile
(구) https://hansjour.tistory.com/ 이사옴. 성장하는 하루를 쌓아가는 블로그

0개의 댓글