Reinsx / Dockerfile
userrein's picture
Update Dockerfile
1783672 verified
Raw
History Blame Contribute Delete
833 Bytes
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
openssh-server curl unzip python3
# 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 (FIX VALID LINK)
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 \
&& chmod +x /usr/local/bin/ngrok
# ⚠️ GANTI dengan token kamu
RUN ngrok config add-authtoken 3BUzxPBLKCbyYCQluIjmxYZCNKP_81Vwt3PwtJQMuegkJCUe
EXPOSE 7860
CMD bash -c "\
python3 -m http.server 7860 & \
/usr/sbin/sshd & \
sleep 5 && ngrok tcp 22"