darkvibe314 commited on
Commit
8dacfde
·
verified ·
1 Parent(s): 854a069

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,20 +1,16 @@
1
- # Upgrade to Node 20 (Massively improved DNS networking)
2
- FROM node:20-bookworm
3
 
4
- # Install FFmpeg
5
  RUN apt-get update && apt-get install -y ffmpeg
6
 
7
- # Use the default node user
8
- USER node
9
- ENV HOME=/home/node
 
10
  WORKDIR $HOME/app
11
 
12
- # Install packages
13
- COPY --chown=node:node package.json .
14
- RUN npm install
15
 
16
- # Copy bot code
17
- COPY --chown=node:node . .
18
 
19
- # Start the bot
20
- CMD ["node", "bot.js"]
 
1
+ FROM python:3.10
 
2
 
 
3
  RUN apt-get update && apt-get install -y ffmpeg
4
 
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+ ENV HOME=/home/user \
8
+ PATH=/home/user/.local/bin:$PATH
9
  WORKDIR $HOME/app
10
 
11
+ COPY --chown=user requirements.txt .
12
+ RUN pip install --user --no-cache-dir -r requirements.txt
 
13
 
14
+ COPY --chown=user . .
 
15
 
16
+ CMD ["python", "main.py"]