개발

Docker Install (우분투에 도커 설치, WSL2)

gyeomii 2023. 6. 5. 10:05
반응형

Install

Ubuntu 설치

  • Microsoct store에서 ubuntu를 검색해 설치한다.

Ubuntu 실행

  1. 아이디, pw 설정

  1. root계정 비밀번호 설정
  2. $ sudo passwd root

Docker 설치

apt-update 최신상태인지 체크

$ 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 저장소를 추가

$ apt install docker.io

 

시스템 패키지 업데이트

$ apt-get update

 

docker 설치

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

 

docker service 등록상태 확인

$ service --status-all

 

docker 실행

$ service docker start (stop, status)

 

docker를 실행 확인

$ service docker status

 

실행했는데 실행되지 않을 때

$ update-alternatives --config iptables
$ 1

Install Docker in WSL2 with Ubuntu 22.04 LTS

 

Install Docker in WSL2 with Ubuntu 22.04 LTS

Installing Docker in WSL2 with Ubuntu 22.04 will not go without issues if you don't change the iptables configuration.

crapts.org

[Docker service won't start on Ubuntu 22.04 on WSL2]

(https://askubuntu.com/questions/1437128/docker-service-wont-start-on-ubuntu-22-04-on-wsl2)

 

git 설치

$ apt install git

 

nodejs 설치

$ apt install nodejs

 

npm 설치

$ apt install npm
반응형