Update Dockerfile
Browse files- Dockerfile +8 -17
Dockerfile
CHANGED
@@ -1,27 +1,18 @@
|
|
1 |
-
# Use
|
2 |
-
FROM python:3.
|
3 |
|
4 |
-
# Set
|
5 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
6 |
-
ENV PYTHONUNBUFFERED=1
|
7 |
-
|
8 |
-
# Set work directory
|
9 |
WORKDIR /app
|
10 |
|
11 |
-
#
|
12 |
-
COPY requirements.txt .
|
13 |
-
RUN pip install --upgrade pip
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
-
# Copy
|
17 |
COPY . .
|
18 |
|
19 |
# Expose the port the app runs on
|
20 |
EXPOSE 5000
|
21 |
|
22 |
-
#
|
23 |
-
|
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"]
|
|
|
|
|
|
|
|