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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -27
Dockerfile CHANGED
@@ -3,7 +3,6 @@ FROM ubuntu:22.04
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PORT=7860
5
 
6
- # Install base packages and build tools
7
  RUN apt update && apt upgrade -y && \
8
  apt-get install -y \
9
  python3 python3-pip \
@@ -16,41 +15,22 @@ RUN apt update && apt upgrade -y && \
16
  procps \
17
  ca-certificates \
18
  build-essential \
19
- wget \
20
- make \
21
- gcc \
22
- zlib1g-dev && \
23
  apt-get clean && rm -rf /var/lib/apt/lists/*
24
 
25
- # Install Python library
26
  RUN pip3 install --no-cache-dir pytelegrambotapi
27
 
28
- # SSH key for tmate
29
  RUN mkdir -p /root/.ssh && \
30
  ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' && \
31
  chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa
32
 
33
- # Clone freeroot
34
- RUN git clone https://github.com/foxytouxxx/freeroot.git /opt/freeroot
35
-
36
- # Download and build proot from source
37
- RUN mkdir -p /tmp/proot-src && \
38
- cd /tmp/proot-src && \
39
- wget https://github.com/proot-me/proot/archive/refs/tags/v5.4.0.tar.gz && \
40
- tar -xzf v5.4.0.tar.gz && \
41
- cd proot-5.4.0 && \
42
- make -j$(nproc) && \
43
- mkdir -p /opt/freeroot/usr/local/bin && \
44
- cp src/proot /opt/freeroot/usr/local/bin/proot && \
45
- chmod +x /opt/freeroot/usr/local/bin/proot && \
46
- rm -rf /tmp/proot-src
47
-
48
- # Make freeroot script executable
49
- RUN chmod +x /opt/freeroot/root.sh
50
-
51
- # Minimal HTTP server
52
  RUN mkdir -p /app && echo "Tmate Session Running..." > /app/index.html
53
  WORKDIR /app
54
 
55
- # Start HTTP + tmate
 
 
56
  CMD python3 -m http.server $PORT & tmate -F
 
3
  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 \
 
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