update.
This commit is contained in:
@ -2,6 +2,8 @@ FROM ubuntu:18.04
|
|||||||
LABEL maintainer="amass <168062547@qq.com>"
|
LABEL maintainer="amass <168062547@qq.com>"
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
ENV TCPING_VERSION=2.7.1
|
||||||
|
|
||||||
ARG USER_NAME=amass
|
ARG USER_NAME=amass
|
||||||
ARG USER_UID=1000
|
ARG USER_UID=1000
|
||||||
|
|
||||||
@ -13,11 +15,16 @@ RUN apt update \
|
|||||||
&& apt install -y gcc g++ gdb cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \
|
&& apt install -y gcc g++ gdb cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \
|
||||||
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev zlib1g-dev gettext jq bzip2 unzip xz-utils \
|
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev zlib1g-dev gettext jq bzip2 unzip xz-utils \
|
||||||
bc cpio dosfstools mtools tree htop sudo gosu \
|
bc cpio dosfstools mtools tree htop sudo gosu \
|
||||||
|
libpython2.7 inetutils-ping\
|
||||||
&& wget https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd64 -O /usr/bin/tini \
|
&& wget https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd64 -O /usr/bin/tini \
|
||||||
&& chmod +x /usr/bin/tini \
|
&& chmod +x /usr/bin/tini \
|
||||||
&& apt clean \
|
&& apt clean \
|
||||||
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
RUN wget https://github.com/pouriyajamshidi/tcping/releases/download/v${TCPING_VERSION}/tcping-linux-amd64-static.tar.gz -O /tmp/tcping-linux-amd64-static.tar.gz \
|
||||||
|
&& tar -xzf /tmp/tcping-linux-amd64-static.tar.gz -C /usr/bin \
|
||||||
|
&& rm /tmp/tcping-linux-amd64-static.tar.gz
|
||||||
|
|
||||||
RUN mkdir /var/run/sshd \
|
RUN mkdir /var/run/sshd \
|
||||||
&& sed -i 's/#Port 22/Port 1022/' /etc/ssh/sshd_config \
|
&& sed -i 's/#Port 22/Port 1022/' /etc/ssh/sshd_config \
|
||||||
&& sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
|
&& sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
|
||||||
@ -38,7 +45,7 @@ RUN set -eux; \
|
|||||||
RUN mkdir -p /home/${USER_NAME}/.ssh \
|
RUN mkdir -p /home/${USER_NAME}/.ssh \
|
||||||
&& chown ${USER_UID}:${USER_GID} /home/${USER_NAME}/.ssh \
|
&& chown ${USER_UID}:${USER_GID} /home/${USER_NAME}/.ssh \
|
||||||
&& chmod 700 /home/${USER_NAME}/.ssh \
|
&& chmod 700 /home/${USER_NAME}/.ssh \
|
||||||
&& wget https://cloud.amass.fun/s/Z42BPTsfjB53k35/download -O /home/${USER_NAME}/.ssh/authorized_keys \
|
&& wget https://cloud.amass.fun/s/LETwkXKo4m7dqcZ/download -O /home/${USER_NAME}/.ssh/authorized_keys \
|
||||||
&& chown ${USER_UID}:${USER_GID} /home/${USER_NAME}/.ssh/authorized_keys \
|
&& chown ${USER_UID}:${USER_GID} /home/${USER_NAME}/.ssh/authorized_keys \
|
||||||
&& chmod 600 /home/${USER_NAME}/.ssh/authorized_keys
|
&& chmod 600 /home/${USER_NAME}/.ssh/authorized_keys
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user