forked from nspo/pybarsys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (23 loc) · 788 Bytes
/
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
# alpine version is not usable due to issues with locales
FROM python:3
# system dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -yq --no-install-recommends \
locales-all 2>&1 \
| grep -v "delaying package configuration, since apt-utils is not installed" && \
rm -rf /var/lib/apt/lists/*
# run everything as non-root user
RUN useradd --create-home --home-dir /home/pybarsys pybarsys
RUN mkdir -p /app/static && chown -R pybarsys:pybarsys /app
WORKDIR /app
USER pybarsys
ENV PATH="/home/pybarsys/.local/bin:${PATH}"
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# python dependencies
COPY requirements.txt .
RUN pip install --user -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["./scripts/run_with_gunicorn.sh"]