2019-10-04 10:50:52 +01:00
|
|
|
FROM python:3.7-slim-stretch
|
2019-07-22 14:18:33 +01:00
|
|
|
|
2019-09-10 16:00:13 +01:00
|
|
|
COPY ./Pipfile /app/
|
|
|
|
COPY ./Pipfile.lock /app/
|
2019-07-22 14:18:33 +01:00
|
|
|
|
|
|
|
WORKDIR /app/
|
|
|
|
|
2019-10-04 10:50:52 +01:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends build-essential && \
|
|
|
|
pip install pipenv uwsgi --no-cache-dir && \
|
|
|
|
apt-get remove -y --purge build-essential && \
|
|
|
|
apt-get autoremove -y --purge && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN pipenv lock -r > requirements.txt && \
|
2019-10-01 12:50:37 +01:00
|
|
|
pipenv --rm && \
|
2019-09-10 16:00:13 +01:00
|
|
|
pip install -r requirements.txt --no-cache-dir && \
|
2019-10-04 10:50:52 +01:00
|
|
|
adduser --system --no-create-home passbook && \
|
2019-07-22 14:18:33 +01:00
|
|
|
chown -R passbook /app
|