dracoox commited on
Commit
5ecb047
·
verified ·
1 Parent(s): 86014ac

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -44
Dockerfile CHANGED
@@ -1,44 +1,29 @@
1
- FROM ubuntu:22.04
2
-
3
- ENV DEBIAN_FRONTEND=noninteractive
4
-
5
- # Install core tools + PAM + login functionality
6
- RUN apt update && apt upgrade -y && \
7
- apt install -y \
8
- python3 python3-pip \
9
- nodejs npm \
10
- tmate \
11
- openssh-client \
12
- neofetch \
13
- git \
14
- curl \
15
- procps \
16
- ca-certificates \
17
- libpam0g \
18
- libpam-modules \
19
- login && \
20
- apt clean && rm -rf /var/lib/apt/lists/*
21
-
22
- # Create user 'draco' with UID 0 (root privileges) and useful groups
23
- RUN groupadd -f docker && \
24
- useradd -m -u 0 -o -s /bin/bash -G adm,staff,audio,video,docker draco
25
-
26
- # Generate SSH key for tmate (owned by root UID 0)
27
- RUN mkdir -p /root/.ssh && \
28
- ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' && \
29
- chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa
30
-
31
- # Install Telegram bot API
32
- RUN pip3 install --no-cache-dir pytelegrambotapi
33
-
34
- # Setup app directory
35
- RUN mkdir -p /app && echo "Tmate Session Running..." > /app/index.html
36
- WORKDIR /app
37
-
38
- EXPOSE 7860
39
-
40
- # Use draco user (UID 0)
41
- USER draco
42
-
43
- # Start tmate and Python HTTP server in foreground
44
- CMD bash -c "tmate -F & python3 -m http.server 7860 & wait"
 
1
+ # This is Lechcher's VPS on Hugging face or OpenXLab! (Lxde version)
2
+ FROM debian:sid
3
+
4
+ # This is user's part:
5
+ RUN useradd -m -u 1000 user
6
+
7
+ # Upgrade and update your system:
8
+ RUN apt update
9
+ RUN apt install software-properties-common apt-transport-https curl -y
10
+
11
+ # This is desktop environment and dependents part:
12
+ RUN apt install xfce4-terminal lxde aqemu sudo curl wget aria2 qemu-system-x86 htop chromium screen tigervnc-standalone-server python3-pip python3-websockify python3 git -y && rm -rf /var/lib/apt/lists/*
13
+
14
+ # This is set default graphical target:
15
+ RUN systemctl get-default
16
+ RUN systemctl set-default graphical.target
17
+
18
+ # Emable 32bit support:
19
+ RUN dpkg --add-architecture i386
20
+
21
+ # This is part that you can install your apps by: RUN apt install <repositories>:
22
+
23
+ # This is VNC viewer part:
24
+ RUN git clone https://github.com/novnc/noVNC.git noVNC
25
+ ENV HOME=/home/user \
26
+ PATH=/home/user/.local/bin:$PATH
27
+
28
+ # This is the command to run VPS:
29
+ CMD vncserver -SecurityTypes None -geometry 1280x600 && ./noVNC/utils/novnc_proxy --vnc localhost:5901 --listen 0.0.0.0:7860