File size: 859 Bytes
6be44e4 26aab1e 6be44e4 26aab1e 6be44e4 26aab1e 6be44e4 26aab1e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
openssh-server curl wget unzip python3 \
&& rm -rf /var/lib/apt/lists/*
# setup ssh
RUN mkdir /var/run/sshd
RUN echo "root:123456" | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
# install ngrok
RUN curl -L https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.zip -o ngrok.zip \
&& unzip ngrok.zip \
&& mv ngrok /usr/local/bin/ngrok
# GANTI TOKEN KAMU
RUN ngrok config add-authtoken 3BUzxPBLKCbyYCQluIjmxYZCNKP_81Vwt3PwtJQMuegkJCUe
EXPOSE 7860
CMD bash -c "\
echo 'SSH RUNNING' && \
python3 -m http.server 7860 & \
/usr/sbin/sshd & \
sleep 5 && ngrok tcp 22 && \
tail -f /dev/null" |