Adding docker files

This commit is contained in:
Apoclyps
2019-07-24 07:04:23 +01:00
parent 4287ae3153
commit 950256fa4a
4 changed files with 79 additions and 13 deletions

View File

@@ -1,16 +1,28 @@
FROM python:3-alpine
ENV PYTHONUNBUFFERED 1
RUN apk update
RUN apk add --no-cache tini bash unrar dcron postgresql-dev
RUN mkdir /src
WORKDIR /src
ADD Pipfile /src
ADD Pipfile.lock /src
RUN apk add --no-cache tini bash unrar dcron postgresql-dev gcc python3-dev musl-dev
RUN apk add --no-cache --virtual .build-deps mariadb-dev build-base \
&& pip install pipenv \
&& pipenv install --system \
&& apk add --virtual .runtime-deps mariadb-connector-c-dev mariadb-connector-c \
&& apk del .build-deps
ADD . /src/
RUN mkdir /src
WORKDIR /src
ADD Pipfile /src
ADD Pipfile.lock /src
RUN pipenv install --deploy --dev --ignore-pipfile --system
COPY . /src/
RUN cat /src/cbreader/crontab >> /etc/crontabs/root
EXPOSE 8000
EXPOSE 8000