Open wupanhao opened 7 years ago
FROM alpine:latest MAINTAINER ekinghao <ekinghao@gmail.com> RUN apk add --update openssh # RUN apk add nginx RUN ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa &&\ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config &&\ echo "root:123456" | chpasswd # RUN sed -i "s/UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config && sed -i "s/PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config && sed -i "s/#AuthorizedKeysFile/AuthorizedKeysFile/g" /etc/ssh/sshd_config # EXPOSE 80 EXPOSE 22 # CMD ["nginx", "-g", "daemon off;"] CMD ["/usr/sbin/sshd","-D"]
alpine:ssh