File size: 1,419 Bytes
77ef569
 
 
 
ca3fcc6
01cd543
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3a2ee3a
ca3fcc6
f095013
 
cbec269
f095013
cbec269
 
 
 
6d39be9
77ef569
cbec269
 
 
ca3fcc6
e74cd4d
77ef569
ca3fcc6
 
 
 
 
 
 
01acbe5
ca3fcc6
 
 
77ef569
 
 
 
e74cd4d
 
 
77ef569
 
 
e74cd4d
77ef569
3a2ee3a
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

# Update dan install dependencies
RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y \
    curl \
    python3.11 \
    python3-pip \
    libmagic1 \
    speedtest-cli \
    neofetch \
    ffmpeg \
    imagemagick \
    git \
    git-lfs \
    zip \
    wget \
    unzip \
    whois \
    software-properties-common || apt-get install -y --fix-missing

# Install Node.js dan npm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
    apt-get install -y nodejs && \
    npm install -g npm@latest

# Remove existing Yarn if it exists
RUN rm -f /usr/bin/yarn

# Install Yarn
RUN npm install -g yarn

# Install PM2
RUN npm install -g pm2

# Tambah user
RUN useradd -m -u 1000 R-BOT

# Install Golang secara manual
ENV GOLANG_VERSION=1.21.1
RUN wget https://go.dev/dl/go$GOLANG_VERSION.linux-amd64.tar.gz && \
    tar -C /usr/local -xzf go$GOLANG_VERSION.linux-amd64.tar.gz && \
    rm go$GOLANG_VERSION.linux-amd64.tar.gz

# Set GOPATH dan PATH untuk Go
ENV GOPATH=/home/PookieDiatyz/go \
    PATH=/usr/local/go/bin:$GOPATH/bin:$PATH

# Install code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh

# END ROOT USER #

USER R-BOT
ENV HOME=/home/R-BOT \
    PATH=/home/R-BOT/.local/bin:$PATH

WORKDIR $HOME

COPY --chown=R-BOT . $HOME/server

CMD ["code-server", ".", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]