설치 환경

  • NHN Cloud
  • Ubuntu 20.04
  • Docker 23.0.1

 

Ubuntu 인스턴스에 Docker 설치

🐳 Docker Docs 참고

1. apt package index 업데이트 및 apt가 HTTPS를 통해 저장소를 사용할 수 있도록 패키지를 설치합니다.

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release


2. Docker 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


3. 저장소 설정

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


4. Docker Engine 설치

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin


5. Docker의 기본 이미지인 hello-world 이미지를 통해 정상적으로 설치되었는지 테스트

sudo docker run hello-world

 

1. 문제 상황

Ubuntu, CentOS와 같은 Linux에서 netstat 명령어를 실행했을 때
bash: netstat: command not found 오류를 해결하고자 한다!

 

2. 해결 방법
ifconfig, netstat 등 네트워크 관련 명령어의 경우 net-tools 패키지를 설치해야 한다.

  • Ubuntu
apt install net-tools
  • CentOS
yum install net-tools

 

 

참고 사이트

+ Recent posts