Public Repository

Last pushed: a year ago
Short Description
基于supervisord构建sshd
Full Description

FROM finance/supervisord
MAINTAINER Andy_xu

#配置相关的ssh需要的文件,以及相关的用户密码
RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key ;\
ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key ;\
sed -ri 's/session required pam_loginuid.so/#session required pam_loginuid.so/g' /etc/pam.d/sshd ;\
mkdir -p /root/.ssh && chown root.root /root && chmod 700 /root/.ssh ;\
sed -ri 's/#Port 22/Port 51899/g' /etc/ssh/sshd_config ;\
echo 'root:redhat' | chpasswd
EXPOSE 51899

#这里只需要将更新的配置文件拷贝进去,最终会继承父进程中的CMD去执行supervisord中定义的服务
ADD supervisord.conf /etc/supervisord.conf

Docker Pull Command
Owner
finance