dayuadg commited on
Commit
58a57ef
·
verified ·
1 Parent(s): ae42d50

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -36
Dockerfile CHANGED
@@ -1,36 +0,0 @@
1
- FROM ubuntu:22.04
2
-
3
- # Set environment agar tidak interaktif (mencegah error saat install)
4
- ENV DEBIAN_FRONTEND=noninteractive
5
-
6
- # Install paket wajib (SSH & Cloudflared)
7
- RUN apt-get update && apt-get install -y \
8
- curl wget git htop neofetch nano sudo openssh-server iproute2 \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- # Setup SSH & Password
12
- RUN mkdir /var/run/sshd
13
- RUN echo 'root:indonesia' | chpasswd
14
- RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
15
-
16
- # Install Cloudflared
17
- RUN wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \
18
- dpkg -i cloudflared-linux-amd64.deb
19
-
20
- # Buka port 7860 (Syarat Hugging Face)
21
- EXPOSE 7860
22
-
23
- # --- JANTUNG SCRIPT ---
24
- # 1. Jalankan SSH
25
- # 2. Jalankan Tunnel (Background)
26
- # 3. Tampilkan Link Tunnel
27
- # 4. Tidur selamanya (tail -f /dev/null) agar status tetap RUNNING
28
- CMD service ssh start && \
29
- echo "Mencoba menjalankan tunnel..." && \
30
- cloudflared tunnel --url ssh://localhost:22 --logfile /var/log/cloudflared.log > /var/log/tunnel_url.txt 2>&1 & \
31
- sleep 10 && \
32
- echo "=============================================" && \
33
- echo "LINK ANDA ADA DI BAWAH INI (CARI .trycloudflare.com):" && \
34
- cat /var/log/tunnel_url.txt && \
35
- echo "=============================================" && \
36
- tail -f /var/log/cloudflared.log