Ubuntu 14.04 添加ssh服务端的 Dockerfile .

#Version 0.2

FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install openssh-server -y
ADD sshd_config /etc/ssh/sshd_config     #这里和下一行要自备一个ssh_config配置文件和一个写有root密码的文件。
ADD files /root/files
RUN chpasswd < /root/files
RUN service ssh restart
CMD [“/etc/init.d/ssh”, “start”, “-D”]
EXPOSE 22

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