Update Dockerfile
Browse files- Dockerfile +14 -8
Dockerfile
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
#
|
4 |
WORKDIR /app
|
5 |
|
6 |
-
#
|
7 |
-
COPY .
|
|
|
|
|
|
|
8 |
|
9 |
-
#
|
10 |
-
|
|
|
11 |
|
12 |
-
#
|
13 |
-
|
|
|
|
1 |
+
# Base image
|
2 |
+
FROM python:3.10-slim-buster
|
3 |
|
4 |
+
# Working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install dependencies
|
8 |
+
COPY requirements.txt requirements.txt
|
9 |
+
RUN python -m venv venv
|
10 |
+
ENV PATH="/app/venv/bin:$PATH"
|
11 |
+
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev && pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Copy source code
|
14 |
+
COPY . .
|
15 |
+
RUN chmod -R 777 translations
|
16 |
|
17 |
+
# Expose port and start command
|
18 |
+
EXPOSE 8080
|
19 |
+
CMD ["python3", "./run.py"]
|