refactor Dockerfile
This commit is contained in:
parent
db07165676
commit
684e36f420
|
@ -22,17 +22,16 @@ RUN true \
|
||||||
&& apt clean \
|
&& apt clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& sed -i '/C.UTF-8/s/^# //g' /etc/locale.gen \
|
&& sed -i '/C.UTF-8/s/^# //g' /etc/locale.gen \
|
||||||
&& locale-gen \
|
&& locale-gen \
|
||||||
&& update-locale LANG=C.UTF-8 \
|
&& update-locale LANG=C.UTF-8 \
|
||||||
\
|
|
||||||
&& sed -E -i 's/^.*StrictModes.*$/StrictModes no/' '/etc/ssh/sshd_config' \
|
|
||||||
\
|
\
|
||||||
|
&& echo root:${ROOT_PASSWD} | chpasswd \
|
||||||
&& usermod --shell /usr/bin/zsh root \
|
&& usermod --shell /usr/bin/zsh root \
|
||||||
\
|
\
|
||||||
&& mkdir /run/sshd \
|
&& mkdir /run/sshd \
|
||||||
&& sed -i 's/#PermitRootLogin.*$/PermitRootLogin yes/' /etc/ssh/sshd_config \
|
&& sed -E -i 's/^.*StrictModes.*$/StrictModes no/' '/etc/ssh/sshd_config' \
|
||||||
&& sed -i 's#SSHD_OPTS=#SSHD_OPTS=""#' /etc/default/ssh
|
&& sed -i 's/#PermitRootLogin.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/tini", "--" ]
|
ENTRYPOINT [ "/usr/bin/tini", "--" ]
|
||||||
CMD [ "/usr/sbin/sshd", "-D", "-e" ]
|
CMD [ "/usr/sbin/sshd", "-D", "-e" ]
|
||||||
|
|
Loading…
Reference in a new issue