parent
2421fbedf8
commit
c56af71076
35
Dockerfile
35
Dockerfile
|
@ -1,15 +1,20 @@
|
|||
FROM alpine
|
||||
MAINTAINER ZK <zkalgclub@163.com>
|
||||
|
||||
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 <zkalgclub@163.com>
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue