zoreu commited on
Commit
c53ff26
·
verified ·
1 Parent(s): 77f3fd8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -0
Dockerfile CHANGED
@@ -8,5 +8,15 @@ RUN git clone https://github.com/zoreu/mp3app.git .
8
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
 
 
 
 
 
 
 
 
 
 
11
  EXPOSE 7860
12
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"]
 
8
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Criar um usuário não-root
12
+ RUN useradd -m appuser
13
+
14
+ # Definir permissões para as pastas static e downloads
15
+ RUN chown -R appuser:appuser /app/static /app/downloads
16
+ RUN chmod -R 755 /app/static /app/downloads
17
+
18
+ # Mudar para o usuário não-root
19
+ USER appuser
20
+
21
  EXPOSE 7860
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"]