Update Dockerfile
Browse files- Dockerfile +24 -11
Dockerfile
CHANGED
|
@@ -1,16 +1,29 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
RUN python3 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
RUN
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
+
RUN apt update && apt install -y \
|
| 6 |
+
openssh-server curl unzip python3
|
|
|
|
| 7 |
|
| 8 |
+
# setup ssh
|
| 9 |
+
RUN mkdir /var/run/sshd
|
| 10 |
+
RUN echo "root:123456" | chpasswd
|
| 11 |
|
| 12 |
+
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
| 13 |
+
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
| 14 |
|
| 15 |
+
# install ngrok (FIX VALID LINK)
|
| 16 |
+
RUN curl -L https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.zip -o ngrok.zip \
|
| 17 |
+
&& unzip ngrok.zip \
|
| 18 |
+
&& mv ngrok /usr/local/bin/ngrok \
|
| 19 |
+
&& chmod +x /usr/local/bin/ngrok
|
| 20 |
+
|
| 21 |
+
# ⚠️ GANTI dengan token kamu
|
| 22 |
+
RUN ngrok config add-authtoken 3BUzxPBLKCbyYCQluIjmxYZCNKP_81Vwt3PwtJQMuegkJCUe
|
| 23 |
+
|
| 24 |
+
EXPOSE 7860
|
| 25 |
+
|
| 26 |
+
CMD bash -c "\
|
| 27 |
+
python3 -m http.server 7860 & \
|
| 28 |
+
/usr/sbin/sshd & \
|
| 29 |
+
sleep 5 && ngrok tcp 22"
|