-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (28 loc) · 1.06 KB
/
Dockerfile
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
31
32
33
34
35
36
37
38
39
40
# Use an official Python runtime as a parent image
FROM rkrikbaev/tf-env:latest
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
LABEL Auth: Krikbayev Rustam
LABEL Email: "rkrikbaev@gmail.com"
ENV REFRESHED_AT 2023-01-12
# Install any needed packages specified in requirements.txt
COPY ./requirements.txt .
RUN python -m pip install --upgrade pip
RUN pip install -r requirements.txt
# log folder
RUN mkdir -p /logs
# Copy the current directory contents into the container at /app
RUN mkdir app
WORKDIR /app
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser
RUN chown -R appuser /app
RUN chown -R appuser /logs
USER appuser
COPY app/ .
ENV LOG_LEVEL=DEBUG
ENV TIMEOUT=1000
CMD [ "gunicorn", "-b", "0.0.0.0:8005", "api:api", "--timeout", "1000", "--log-level", "debug" ]