-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 784 Bytes
/
Dockerfile
File metadata and controls
27 lines (18 loc) · 784 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
FROM python:3.9-slim
LABEL maintainer "webmaster@knighthacks.org"
ENV TZ America/New_York
RUN apt-get update \
&& apt-get install -y build-essential python3-dev \
&& python3 -m pip install --upgrade pip \
&& groupadd -r knighthacks \
&& useradd --no-log-init -r -g knighthacks backend \
&& mkdir -p /home/backend/app \
&& chown -R backend:knighthacks /home/backend
USER backend:knighthacks
WORKDIR /home/backend/app
COPY --chown=backend:knighthacks requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt
ENV PATH="/home/backend/.local/bin:${PATH}"
COPY --chown=backend:knighthacks . .
ENTRYPOINT [ "gunicorn" ]
CMD [ "-k geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-w 1", "-b 0.0.0.0:5000", "src.__main__:main()" ]