Create Dockerfile
Browse files- Dockerfile +68 -0
Dockerfile
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
|
| 3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
+
|
| 5 |
+
# Update dan install dependencies
|
| 6 |
+
RUN apt-get update && \
|
| 7 |
+
apt-get upgrade -y && \
|
| 8 |
+
apt-get install -y \
|
| 9 |
+
curl \
|
| 10 |
+
python3.11 \
|
| 11 |
+
python3-pip \
|
| 12 |
+
libmagic1 \
|
| 13 |
+
speedtest-cli \
|
| 14 |
+
neofetch \
|
| 15 |
+
ffmpeg \
|
| 16 |
+
imagemagick \
|
| 17 |
+
git \
|
| 18 |
+
git-lfs \
|
| 19 |
+
zip \
|
| 20 |
+
wget \
|
| 21 |
+
unzip \
|
| 22 |
+
whois \
|
| 23 |
+
software-properties-common || apt-get install -y --fix-missing
|
| 24 |
+
|
| 25 |
+
# Install Node.js dan npm
|
| 26 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 27 |
+
apt-get install -y nodejs && \
|
| 28 |
+
npm install -g npm@latest
|
| 29 |
+
|
| 30 |
+
# Remove existing Yarn if it exists
|
| 31 |
+
RUN rm -f /usr/bin/yarn
|
| 32 |
+
|
| 33 |
+
# Install Yarn
|
| 34 |
+
RUN npm install -g yarn
|
| 35 |
+
|
| 36 |
+
# Install PM2
|
| 37 |
+
RUN npm install -g pm2
|
| 38 |
+
|
| 39 |
+
# Install Males Ai
|
| 40 |
+
RUN npm install -g malas
|
| 41 |
+
|
| 42 |
+
# Tambah user
|
| 43 |
+
RUN useradd -m -u 1000 R-BOT
|
| 44 |
+
|
| 45 |
+
# Install Golang secara manual
|
| 46 |
+
ENV GOLANG_VERSION=1.21.1
|
| 47 |
+
RUN wget https://go.dev/dl/go$GOLANG_VERSION.linux-amd64.tar.gz && \
|
| 48 |
+
tar -C /usr/local -xzf go$GOLANG_VERSION.linux-amd64.tar.gz && \
|
| 49 |
+
rm go$GOLANG_VERSION.linux-amd64.tar.gz
|
| 50 |
+
|
| 51 |
+
# Set GOPATH dan PATH untuk Go
|
| 52 |
+
ENV GOPATH=/home/PookieDiatyz/go \
|
| 53 |
+
PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
|
| 54 |
+
|
| 55 |
+
# Install code-server
|
| 56 |
+
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 57 |
+
|
| 58 |
+
# END ROOT USER #
|
| 59 |
+
|
| 60 |
+
USER R-BOT
|
| 61 |
+
ENV HOME=/home/R-BOT \
|
| 62 |
+
PATH=/home/R-BOT/.local/bin:$PATH
|
| 63 |
+
|
| 64 |
+
WORKDIR $HOME
|
| 65 |
+
|
| 66 |
+
COPY --chown=R-BOT . $HOME/server
|
| 67 |
+
|
| 68 |
+
CMD ["code-server", ".", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]
|