ApaCu commited on
Commit
af1f832
·
verified ·
1 Parent(s): e83b766

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -6
Dockerfile CHANGED
@@ -1,10 +1,39 @@
 
1
  FROM ubuntu:22.04
2
 
3
- # Instal dependensi: tmate, ssh, dan library Python 'requests'
4
- RUN apt-get update && apt-get install -y tmate ssh && \
5
- apt-get install -y openssh-client curl wget python3 python3-pip nodejs npm \
6
- screen tmux unzip zip python2 procps ffmpeg nano build-essential git \
7
- pip3 install requests
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  # Atur direktori kerja
10
  WORKDIR /app
@@ -12,5 +41,5 @@ WORKDIR /app
12
  # Salin file 'loader' app.py
13
  COPY app.py .
14
 
15
- # Perintah untuk menjalankan loader
16
  CMD ["python3", "app.py"]
 
1
+ # Gunakan image dasar Ubuntu 22.04
2
  FROM ubuntu:22.04
3
 
4
+ # Set noninteractive frontend untuk menghindari prompt saat instalasi
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Gabungkan semua instalasi apt-get dalam satu layer untuk efisiensi
8
+ # dan bersihkan cache setelahnya untuk memperkecil ukuran image.
9
+ RUN apt-get update && \
10
+ apt-get install -y \
11
+ # Dependensi Tmate & SSH
12
+ tmate \
13
+ ssh \
14
+ openssh-client \
15
+ # Utilitas umum
16
+ curl \
17
+ wget \
18
+ screen \
19
+ tmux \
20
+ unzip \
21
+ zip \
22
+ procps \
23
+ ffmpeg \
24
+ nano \
25
+ build-essential \
26
+ git \
27
+ # Dependensi Python & Node.js
28
+ python3 \
29
+ python3-pip \
30
+ python2 \
31
+ nodejs \
32
+ npm \
33
+ && rm -rf /var/lib/apt/lists/*
34
+
35
+ # Sekarang, setelah pip terinstal, gunakan pip untuk menginstal library Python
36
+ RUN pip3 install requests
37
 
38
  # Atur direktori kerja
39
  WORKDIR /app
 
41
  # Salin file 'loader' app.py
42
  COPY app.py .
43
 
44
+ # Perintah untuk menjalankan loader dengan python3
45
  CMD ["python3", "app.py"]