JustJoin commited on
Commit
a37e022
·
verified ·
1 Parent(s): 3578382

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,23 +1,25 @@
1
  FROM node:20-slim
2
 
3
- # 1. Instal semua alat tempur sistem (ffmpeg, git, dan ssh)
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  git \
7
- openssh-client \
8
  --no-install-recommends && \
9
  rm -rf /var/lib/apt/lists/*
10
 
11
- # 2. Paksa Git belok ke jalur HTTPS (Bypass gembok rahasia SSH)
12
- RUN git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" && \
13
- git config --global url."https://github.com/".insteadOf "git@github.com:"
 
14
 
15
  WORKDIR /app
16
 
17
- # 3. Hanya kopi package.json agar bersih dari cache lockfile lama
 
 
18
  COPY package.json ./
19
 
20
- RUN npm install
21
 
22
  COPY . .
23
 
 
1
  FROM node:20-slim
2
 
3
+ # 1. Jalankan instalasi tools dasar
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  git \
 
7
  --no-install-recommends && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
+ # 2. MANIPULASI LEVEL SYSTEM (Bukan --global)
11
+ # Ini memaksa seluruh sistem Linux kontainer memakai HTTPS, tak peduli siapa yang manggil
12
+ RUN git config --system url."https://github.com/".insteadOf "ssh://git@github.com/" && \
13
+ git config --system url."https://github.com/".insteadOf "git@github.com:"
14
 
15
  WORKDIR /app
16
 
17
+ # 3. TRIK CACHE BREAKER (Ubah angka di bawah jika ingin memaksa hapus cache di masa depan)
18
+ ENV CACHE_BYPASS_TIMESTAMP=202606212300
19
+
20
  COPY package.json ./
21
 
22
+ RUN npm install --prefer-online --no-audit
23
 
24
  COPY . .
25