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