Server(B)
1. docker 설치
도커 레파지토리를 추가
- snippet.shell
# echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" >> /etc/apt/sources.list
- snippet.shell
# apt-get update
HTTPS 통신에 사용되는 패키지와 공개키를 설치
- snippet.shell
# apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- snippet.shell
# apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
linux-image extra와 docker-engine 패키지를 설치
- snippet.shell
# sudo apt-get update # apt-get install linux-image-extra-$(uname -r) # apt-get install docker-engine
2. nginx 컨테이너 실행
- snippet.shell
docker container run -d -p 9000:90 nginx docker container ls mkdir docker cd docker
3. index.html 수정
Server에서 웹브라우저 접근
1. ip 확인
- snippet.shell
student@M50423 C:\Users\student # ipconfig Windows IP 구성 이더넷 어댑터 Npcap Loopback Adapter: 연결별 DNS 접미사. . . . : 링크-로컬 IPv6 주소 . . . . : fe80::edf9:1dfd:25a4:290e%20 자동 구성 IPv4 주소 . . . . : 169.254.41.14 서브넷 마스크 . . . . . . . : 255.255.0.0 기본 게이트웨이 . . . . . . : 이더넷 어댑터 로컬 영역 연결 2: 연결별 DNS 접미사. . . . : IPv4 주소 . . . . . . . . . : 70.12.50.183 서브넷 마스크 . . . . . . . : 255.255.255.0 기본 게이트웨이 . . . . . . : 70.12.50.1