xdragxt commited on
Commit
462a607
·
verified ·
1 Parent(s): e1008ae

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -41
Dockerfile CHANGED
@@ -1,41 +1,39 @@
1
- FROM python:3.10-slim
2
-
3
- ENV TZ=Asia/Kolkata
4
- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5
-
6
- RUN apt-get update && apt-get install -y --no-install-recommends \
7
- apt-get install -y gdb\
8
- git gcc python3-dev ffmpeg mediainfo neofetch && \
9
- apt-get clean && rm -rf /var/lib/apt/lists/*
10
-
11
- WORKDIR /app
12
-
13
- COPY . .
14
-
15
- ENV PIP_ROOT_USER_ACTION=ignore
16
-
17
- RUN pip install --upgrade pip
18
- RUN pip install --no-cache-dir -r requirements.txt
19
- ##RUN pip install uvicorn fastapi
20
-
21
-
22
-
23
- RUN bash installer.sh
24
-
25
- # Fix for Git's 'dubious ownership' error
26
- RUN git config --global --add safe.directory /app
27
-
28
-
29
-
30
- # Ensure writable dirs
31
- RUN mkdir -p /app/sessions && chmod -R 777 /app/sessions
32
- RUN mkdir -p /app/resources/auth && chmod -R 777 /app/resources
33
- RUN mkdir -p /app/tmp && chmod -R 777 /app/tmp
34
- RUN mkdir -p /app/pdf && chmod -R 777 /app/pdf
35
-
36
-
37
- ENV PYTHONPATH="${PYTHONPATH}:/app"
38
-
39
- CMD bash startup
40
-
41
-
 
1
+ FROM python:3.10-slim
2
+
3
+ ENV TZ=Asia/Kolkata
4
+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5
+
6
+ # Install dependencies
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ gdb \
9
+ git \
10
+ gcc \
11
+ python3-dev \
12
+ ffmpeg \
13
+ mediainfo \
14
+ neofetch && \
15
+ apt-get clean && rm -rf /var/lib/apt/lists/*
16
+
17
+ WORKDIR /app
18
+
19
+ COPY . .
20
+
21
+ ENV PIP_ROOT_USER_ACTION=ignore
22
+
23
+ # Install Python dependencies
24
+ RUN pip install --upgrade pip && \
25
+ pip install --no-cache-dir -r requirements.txt
26
+
27
+ # Run custom installer script
28
+ RUN bash installer.sh
29
+
30
+ # Fix Git safe directory error
31
+ RUN git config --global --add safe.directory /app
32
+
33
+ # Ensure writable directories
34
+ RUN mkdir -p /app/sessions /app/resources/auth /app/tmp /app/pdf && \
35
+ chmod -R 777 /app/sessions /app/resources /app/tmp /app/pdf
36
+
37
+ ENV PYTHONPATH="${PYTHONPATH}:/app"
38
+
39
+ CMD ["bash", "startup"]