2019-01-21 12:54:46 +00:00
|
|
|
FROM alpine:3.8
|
2017-06-23 21:00:42 +00:00
|
|
|
|
2019-01-21 12:54:46 +00:00
|
|
|
RUN \
|
|
|
|
echo 'installing dependencies' && \
|
|
|
|
apk add \
|
|
|
|
bash \
|
|
|
|
git \
|
|
|
|
gettext \
|
|
|
|
musl-dev \
|
|
|
|
gcc \
|
|
|
|
postgresql-dev \
|
|
|
|
python3-dev \
|
|
|
|
py3-psycopg2 \
|
|
|
|
py3-pillow \
|
|
|
|
libldap \
|
|
|
|
ffmpeg \
|
|
|
|
libpq \
|
|
|
|
libmagic \
|
|
|
|
libffi-dev \
|
2019-06-19 08:54:45 +00:00
|
|
|
make \
|
2019-01-21 12:54:46 +00:00
|
|
|
zlib-dev \
|
|
|
|
openldap-dev && \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
ln -s /usr/bin/python3 /usr/bin/python
|
2019-01-11 12:50:42 +00:00
|
|
|
|
2019-01-21 12:54:46 +00:00
|
|
|
RUN mkdir /requirements
|
2017-12-16 15:22:46 +00:00
|
|
|
COPY ./requirements/base.txt /requirements/base.txt
|
2019-01-24 10:04:29 +00:00
|
|
|
# hack around https://github.com/pypa/pip/issues/6158#issuecomment-456619072
|
|
|
|
ENV PIP_DOWNLOAD_CACHE=/noop/
|
2019-01-21 12:54:46 +00:00
|
|
|
RUN \
|
|
|
|
echo 'fixing requirements file for alpine' && \
|
|
|
|
sed -i '/Pillow/d' /requirements/base.txt && \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
echo 'installing pip requirements' && \
|
2019-01-24 10:04:29 +00:00
|
|
|
pip3 install --upgrade pip && \
|
|
|
|
pip3 install setuptools wheel && \
|
|
|
|
pip3 install -r /requirements/base.txt && \
|
|
|
|
rm -rf $PIP_DOWNLOAD_CACHE
|
2017-06-23 21:00:42 +00:00
|
|
|
|
2019-01-21 12:54:46 +00:00
|
|
|
ARG install_dev_deps=0
|
|
|
|
COPY ./requirements/*.txt /requirements/
|
|
|
|
RUN \
|
|
|
|
if [ "$install_dev_deps" = "1" ] ; then echo "Installing dev dependencies" && pip3 install --no-cache-dir -r /requirements/local.txt -r /requirements/test.txt ; else echo "Skipping dev deps installation" ; fi
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["./compose/django/entrypoint.sh"]
|
2019-06-19 08:26:09 +00:00
|
|
|
CMD ["./compose/django/server.sh"]
|
2019-01-21 12:54:46 +00:00
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|