docker 서버 구축 요약
Docker를 활용한 개인 가상화 서버 구축
1. 제어판>프로그램 제거 또는 변경>Windows 기능 켜기/끄기>Hyper-V 활성화
2. Docker 설치
https://hub.docker.com/editions/community/docker-ce-desktop-windows/
WSL 2 installation is incomplete. 메시지 발생시 커널 업데이트 패키지 설치
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
3. ubuntu 이미지 다운로드
Docker 회원가입
cmd(명령 프롬프트) 실행
docker pull ubuntu
4. ubuntu 컨테이너 생성
docker run --name ubuntu_server -p 8780:80 -p 9922:22 -p 2443:443 -it ubuntu /bin/bash
5. ubuntu ssh 접속 설정하기
$ apt-get update
$ apt-get install curl
$ apt-get install openssh-server
$ apt-get install vim
$ apt-get install net-tools
$ vi /etc/ssh/sshd_config
port 22 주석해제
#PermitRootLogin prohibit-password --> PermitRootLogin yes 루트접속 허용
UsePAM yes 주석처리
저장후 종료 (:wq)
$ passwd (루트패스워드 변경)
6. nginx 설치
$ apt-get install nginx
$ service nginx start