dracoox commited on
Commit
1242209
·
verified ·
1 Parent(s): f54ae0b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -18
Dockerfile CHANGED
@@ -4,33 +4,37 @@ ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PORT=7860
5
 
6
  RUN apt update && apt upgrade -y && \
7
- apt-get 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
  build-essential \
18
- wget && \
19
- apt-get clean && rm -rf /var/lib/apt/lists/*
20
 
21
- RUN pip3 install --no-cache-dir pytelegrambotapi
 
 
 
 
 
 
 
22
 
23
- RUN mkdir -p /root/.ssh && \
24
- ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' && \
25
- chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa
26
 
27
- RUN git clone https://github.com/foxytouxxx/freeroot.git /opt/freeroot && \
28
- chmod +x /opt/freeroot/root.sh
 
29
 
30
- RUN mkdir -p /app && echo "Tmate Session Running..." > /app/index.html
31
- WORKDIR /app
32
 
33
- # Optionally run the installer here automatically:
34
- # RUN yes | /opt/freeroot/root.sh
35
 
36
- CMD python3 -m http.server $PORT & tmate -F
 
4
  ENV PORT=7860
5
 
6
  RUN apt update && apt upgrade -y && \
7
+ apt install -y \
8
  python3 python3-pip \
9
+ curl wget git \
 
10
  openssh-client \
11
  neofetch \
 
 
12
  procps \
13
  ca-certificates \
14
  build-essential \
15
+ sudo && \
16
+ apt clean && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Create user draco with UID 1000 and no password
19
+ RUN useradd -m -u 1000 -s /bin/bash draco && \
20
+ echo "draco ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
21
+
22
+ # Install latest Node.js v20 and npm from NodeSource
23
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
24
+ apt install -y nodejs && \
25
+ npm install -g npm@latest
26
 
27
+ # Install Python Telegram Bot API
28
+ RUN pip3 install --no-cache-dir pytelegrambotapi
 
29
 
30
+ # Create a working directory
31
+ RUN mkdir -p /home/draco/app && \
32
+ chown -R draco:draco /home/draco/app
33
 
34
+ USER draco
35
+ WORKDIR /home/draco/app
36
 
37
+ # Dummy app content
38
+ RUN echo "Tmate Session Running..." > index.html
39
 
40
+ CMD python3 -m http.server $PORT