31 lines
548 B
Docker
31 lines
548 B
Docker
|
FROM alpine:3.6
|
||
|
|
||
|
ENV APPS_DIR /opt/apps
|
||
|
ENV DB_DIR $APPS_DIR/db
|
||
|
ENV STATIC_ROOT $APPS_DIR/static
|
||
|
|
||
|
COPY requirements.txt $APPS_DIR/
|
||
|
|
||
|
WORKDIR $APPS_DIR
|
||
|
|
||
|
RUN set -ex \
|
||
|
&& buildDeps=' \
|
||
|
build-base \
|
||
|
python3-dev \
|
||
|
' \
|
||
|
&& apk --no-cache --update add \
|
||
|
mailcap \
|
||
|
python3 \
|
||
|
$buildDeps \
|
||
|
&& pip3 install --no-cache-dir --upgrade pip \
|
||
|
&& pip3 install --no-cache-dir --upgrade -r requirements.txt \
|
||
|
&& apk del $buildDeps \
|
||
|
&& rm -rf /var/cache/apk/*
|
||
|
|
||
|
COPY ./collection $APPS_DIR
|
||
|
|
||
|
VOLUME $DB_DIR
|
||
|
|
||
|
EXPOSE 8000
|
||
|
CMD ["/bin/sh"]
|