Docker por lotes generar script de imagen


DESDE centos7
MAINTAINER lee 20200323
RUN rm -rf /etc/yum.repos.d/*;mkdir -p /root/.ssh/
COPY Centos-7-al.repo /etc/yum.repos.d/
COPY id_rsa.pub /root/.ssh/authorized_keys
RUN yum install passwd -y
RUN echo 123456 | passwd --stdin root
RUN yum install net-tools -y openssh-server -y
RUN sed -i '/ DNS / s / # // g' / etc / ssh / sshd_config
RUN sed -i '/ DNS / s / yes / no / g' / etc / ssh / sshd_config
AÑADIR ssh.tar / etc / ssh /
RUN chmod 600 / etc / ssh / *
VOLUME / var / www / html /
WORKDIR / root /
CMD / usr / sbin / sshd; / bin / bash
 

14 artículos originales publicados · Me gusta0 · Visitas 414

Supongo que te gusta

Origin blog.csdn.net/falnet/article/details/105181276
Recomendado
Clasificación