使用dockerfile 创建ubuntu ssh镜像

############################################################
# Dockerfile to build ubunto ssh container images
# Based on Ubuntu
############################################################ FROM ubuntu MAINTAINER jinyetongxiao ENV TZ Asia/Shanghai
ENV LANG zh_CN.UTF- RUN sed -i 's#http://archive.ubuntu.com/#http://cn.archive.ubuntu.com/#' /etc/apt/sources.list RUN apt-get update && \
apt-get -y install vim && \
apt-get -y install openssh-server && \
apt-get clean && \
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* RUN echo 'root:root' |chpasswd RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config RUN mkdir /var/run/sshd EXPOSE #Start ssh Service
CMD ["/usr/sbin/sshd", "-D"]
上一篇:react生命周期函数使用箭头函数,导致mobx-react问题


下一篇:DownthemAll插件,eval和Function