File size: 1,492 Bytes
a387bc6
 
 
 
 
 
4728f5b
a387bc6
 
46755b6
a387bc6
 
 
4728f5b
 
46755b6
4728f5b
 
 
46755b6
 
 
a387bc6
 
 
 
46755b6
a387bc6
 
 
0a32700
a387bc6
86276dd
a387bc6
 
 
46755b6
86276dd
 
46755b6
 
 
 
 
a387bc6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV HOSTNAME=Nobita

# -----------------------------
# 1. Install Basic Tools (Tetap Tanpa Repo NodeSource!)
# -----------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates curl wget git sudo procps xz-utils \
    && rm -rf /var/lib/apt/lists/*

# -----------------------------
# 2. Stealth Node.js v22 Installation (Manual Binary)
# Kita pake v22.13.1 (LTS di 2026) biar paling stabil buat Baileys
# -----------------------------
RUN wget https://nodejs.org/dist/v22.13.1/node-v22.13.1-linux-x64.tar.xz && \
    tar -xJf node-v22.13.1-linux-x64.tar.xz -C /usr/local --strip-components=1 && \
    rm node-v22.13.1-linux-x64.tar.xz

# -----------------------------
# 3. Install code-server (VS Code)
# -----------------------------
RUN curl -fsSL https://code-server.dev/install.sh | sh

# -----------------------------
# 4. Setup User & Workspace
# -----------------------------
RUN useradd -m -u 1000 user
WORKDIR /home/user/app
RUN mkdir -p /tmp/vsc /tmp/ext && chown -R user:user /tmp/vsc /tmp/ext /home/user/app

USER root
EXPOSE 7860

# -----------------------------
# 5. SMART STARTUP (DNS Nancep + VS Code)
# -----------------------------
CMD bash -c "echo -e 'nameserver 8.8.8.8\nnameserver 1.1.1.1' > /etc/resolv.conf; \
    code-server --bind-addr 0.0.0.0:7860 \
    --auth none \
    --user-data-dir /tmp/vsc \
    --extensions-dir /tmp/ext \
    --disable-telemetry"