Docker:centos6增加ssh服务Dockerfile脚本
# This is a commentFROM index.alauda.cn/linzhiqiang/centos6:latest
MAINTAINER Docker lawsonduan <13911151950@163.com>
RUN yum install -y openssh-server
RUN sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN mkdir -p /var/run/sshd
RUN echo 'root:futong-jw' |chpasswd
EXPOSE 22
ENTRYPOINT /usr/sbin/sshd -D
页:
[1]