remainsalways commited on
Commit
f83864a
·
verified ·
1 Parent(s): d242ed9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -12
Dockerfile CHANGED
@@ -1,20 +1,34 @@
1
- FROM python:3.9.5-buster
2
- RUN apt update && apt upgrade -y
3
- RUN apt-get install git curl python3-pip ffmpeg -y
4
- RUN apt-get -y install git
5
- RUN apt-get install -y wget python3-pip curl bash neofetch ffmpeg software-properties-common
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  WORKDIR /app
7
  COPY . /app
 
 
8
  RUN pip3 install --no-cache-dir -U pip redis fastapi nest-asyncio uvicorn && \
9
  pip3 install --no-cache-dir -r requirements.txt
10
 
11
- RUN chown -R 1000:0 /app /usr && \
12
- chmod -R 755 /app /usr && \
13
- chmod 777 /app/start && \
 
14
  chmod +x /app/start
15
-
16
- RUN ls /app
17
  EXPOSE 5000 8000
18
- #CMD python3 -m devgagan & flask run -h 0.0.0.0 -p 8000
19
- # CMD gunicorn app:app & python3 -m devgagan
20
  CMD ["./start"]
 
1
+ # Use a modern, supported Debian base (Bookworm)
2
+ FROM python:3.9-slim-bookworm
3
+
4
+ # Set environment variables to keep apt quiet
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Combine updates and installs into one layer to save space
8
+ RUN apt-get update && apt-get upgrade -y && \
9
+ apt-get install -y --no-install-recommends \
10
+ git \
11
+ curl \
12
+ wget \
13
+ bash \
14
+ neofetch \
15
+ ffmpeg \
16
+ software-properties-common && \
17
+ rm -rf /var/lib/apt/lists/*
18
+
19
  WORKDIR /app
20
  COPY . /app
21
+
22
+ # Upgrade pip and install requirements
23
  RUN pip3 install --no-cache-dir -U pip redis fastapi nest-asyncio uvicorn && \
24
  pip3 install --no-cache-dir -r requirements.txt
25
 
26
+ # Permissions
27
+ # Note: Changing permissions on /usr is generally discouraged unless strictly necessary
28
+ RUN chown -R 1000:0 /app && \
29
+ chmod -R 755 /app && \
30
  chmod +x /app/start
31
+
 
32
  EXPOSE 5000 8000
33
+
 
34
  CMD ["./start"]