vauth commited on
Commit
4da5dca
·
verified ·
1 Parent(s): 3ab6224

UPDATE moved to ubuntu

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -3
Dockerfile CHANGED
@@ -1,9 +1,35 @@
1
- FROM catub/catuserbot:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  RUN git clone https://github.com/TgCatUB/catuserbot
 
 
3
  RUN chmod -R 777 catuserbot
4
- RUN pip install sqlalchemy-cockroachdb
5
  WORKDIR catuserbot
6
  ENV TZ=Asia/Kolkata
7
  COPY . .
8
- ENV PATH="/home/userbot/bin:$PATH"
 
 
 
 
 
9
  CMD ["sh", "-c", "python3 -m http.server 7860 & python3 -m userbot"]
 
1
+ FROM ubuntu:24.04
2
+
3
+ # Switch to root
4
+ USER root
5
+
6
+ # Create the keyring directory, install packages, and set up Node.js
7
+ RUN apt-get update && apt-get upgrade -y \
8
+ && mkdir -p /etc/apt/keyrings \
9
+ && apt-get install --no-install-recommends -y \
10
+ ca-certificates curl ffmpeg fonts-noto-color-emoji gcc git gnupg \
11
+ python3 python3-pip python3-dev python3-lxml python3-psycopg2 \
12
+ libmagickwand-dev libpq-dev mediainfo nano neofetch pv \
13
+ screen tree unzip virtualenv wget zlib1g libyaml-dev \
14
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
15
+ && NODE_MAJOR=18 \
16
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
17
+ && apt-get update \
18
+ && apt-get install nodejs -y \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
+ # Clone the repo
22
  RUN git clone https://github.com/TgCatUB/catuserbot
23
+
24
+ # Switch directory
25
  RUN chmod -R 777 catuserbot
 
26
  WORKDIR catuserbot
27
  ENV TZ=Asia/Kolkata
28
  COPY . .
29
+
30
+ # Install dependencies
31
+ RUN pip install --no-cache-dir --break-system-packages -r requirements.txt
32
+ RUN pip install --no-cache-dir --break-system-packages sqlalchemy-cockroachdb
33
+
34
+ # Start userbot along with health checks server
35
  CMD ["sh", "-c", "python3 -m http.server 7860 & python3 -m userbot"]