CentOS 6.6 添加 ssh 服务端的 Dockerfile .

#centos6
FROM centos:6.6
RUN yum clean all
RUN yum update -y
RUN yum install openssh-server -y
RUN echo ‘windows!’ | passwd –stdin root
RUN sed -i ‘s/#PermitRootLogin/PermitRootLogin/g’ /etc/ssh/sshd_config
RUN ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key && ssh-keygen -t dsa -b 1024 -f /etc/ssh/ssh_host_dsa_key
CMD [“/usr/sbin/sshd”, “-D”]
EXPOSE 22

Proudly powered by WordPress | Theme: Code Blog by Crimson Themes.