-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 736 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -------------------------------------------------------
# Official Docker python image
FROM python:3.10-slim-buster as base
# Setup No buffer for python output
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Update python pip
RUN pip install --upgrade pip
# Setup working directory
RUN mkdir -p /src
WORKDIR /src
# Add Files
ADD src /src/
COPY requirements.txt /src/
# Install project dependencies
RUN pip install -r /src/requirements.txt
# RUN --mount=type=cache,target=/root/.cache/pip pip install -r /auth/requirements.txt
# Expose ports
EXPOSE 8080
# Start Sub-processes
WORKDIR /src
CMD export ENVIRONMENT=".env_prod" && python service.py | tee /service.log
# -------------------------------------------------------