Niansuh commited on
Commit
fd58680
·
verified ·
1 Parent(s): d3e86e7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -17
Dockerfile CHANGED
@@ -1,27 +1,18 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.11-slim@sha256:5148c0e4bbb64271bca1d3322360ebf4bfb7564507ae32dd639322e4952a6b16
3
 
4
- # Set environment variables
5
- ENV PYTHONDONTWRITEBYTECODE=1
6
- ENV PYTHONUNBUFFERED=1
7
-
8
- # Set work directory
9
  WORKDIR /app
10
 
11
- # Install dependencies
12
- COPY requirements.txt .
13
- RUN pip install --upgrade pip
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy project
17
  COPY . .
18
 
19
  # Expose the port the app runs on
20
  EXPOSE 5000
21
 
22
- # Use a non-root user for security
23
- RUN adduser --disabled-password myuser
24
- USER myuser
25
-
26
- # Command to run the application using Gunicorn
27
- CMD ["gunicorn", "--bind", "0.0.0.0:5000", "proxy:app"]
 
1
+ # Use official Python image
2
+ FROM python:3.9-slim
3
 
4
+ # Set working directory
 
 
 
 
5
  WORKDIR /app
6
 
7
+ # Copy requirements and install dependencies
8
+ COPY requirements.txt requirements.txt
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy app files
12
  COPY . .
13
 
14
  # Expose the port the app runs on
15
  EXPOSE 5000
16
 
17
+ # Run the Flask server
18
+ CMD ["python", "app.py"]