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