Please assign a menu to the primary menu location under menu

Containers

How to Running an SSH services in a Docker Container

Docker를 가지고 해당 Container에 SSH 서비스를 운영할수 있는 방법에 대해 설명 드리겠습니다. Dockerfile 문서 파일을 생성후 아래와 같이 저장 합니다. root@ruo91:~# nano Dockerfile # # SSH Daemon Service # # Images를 선택 FROM ubuntu:12.04 MAINTAINER Yongbok Kim <ruo91@yongbok.net> # 기존 미러 서버를 한국 서버로 변경 RUN sed -i ‘s/archive.ubuntu.com/ftp.neowiz.com/g’ /etc/apt/sources.list # 최신버전으로 업데이트 후 SSH 및 필요 패키지 설치 RUN apt-get update ; apt-get install -y openssh-server aptitude net-tools curl # SSH 관련 설정 RUN mkdir /var/run/sshd RUN sed -i “/^*UsePAM/ s/.*/#&/” /etc/ssh/sshd_config RUN echo “UsePAM no” >> /etc/ssh/sshd_config # Root 비밀번호 설정 RUN echo ‘root:123456789’ |chpasswd # SSH 포트

1 2