From c56af7107641dbc5628418d210ab31912551fe26 Mon Sep 17 00:00:00 2001 From: wangzixiang <17839623189@163.com> Date: Tue, 4 Jun 2024 15:56:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update --- Dockerfile | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07a2c83..a7b71ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,20 @@ -FROM alpine -MAINTAINER ZK - -RUN apk add --update openssh-client && rm -rf /var/cache/apk/* - -CMD rm -rf /root/.ssh && mkdir /root/.ssh && cp -R /root/ssh/* /root/.ssh/ && chmod -R 600 /root/.ssh/* && \ -ssh \ --C \ --f \ --N \ --g \ --p $REMOTE_PORT \ --L $LOCAL_LISTEN_PORT:$LOCAL_LISTEN_HOST:$REMOTE_LISTEN_PORT $REMOTE_USER@$REMOTE_HOST \ -&& while true; do sleep 10; done; -EXPOSE 1-65535 +FROM ubuntu +MAINTAINER ZK + +WORKDIR $MYPATH + +RUN apt-get update +RUN apt-get install -y vim +RUN apt-get install -y net-tools +RUN apt-get install -y iputils-ping + +CMD rm -rf /root/.ssh && mkdir /root/.ssh && cp -R /root/ssh/* /root/.ssh/ && chmod -R 600 /root/.ssh/* && \ +ssh \ +-C \ +-f \ +-N \ +-g \ +-p $REMOTE_PORT \ +-L $LOCAL_LISTEN_PORT:$LOCAL_LISTEN_HOST:$REMOTE_LISTEN_PORT $REMOTE_USER@$REMOTE_HOST \ +&& while true; do sleep 10; done; +EXPOSE 1-65535