2016-12-22 20:00:46 +01:00
|
|
|
FROM python:alpine
|
|
|
|
|
|
|
|
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
|
|
|
&& echo "@community http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
|
|
|
&& apk update \
|
2016-12-22 21:55:22 +01:00
|
|
|
&& apk add --update git g++ libc-dev tcl tk lapack-dev@community openblas@community gfortran libpq \
|
|
|
|
libjpeg-turbo-dev postgresql-dev cyrus-sasl-dev libmemcached-dev geos@testing gettext librsvg-dev \
|
2016-12-22 20:00:46 +01:00
|
|
|
&& mkdir /etc/c3nav \
|
|
|
|
&& mkdir /data \
|
|
|
|
&& mkdir /data/map \
|
|
|
|
&& ln -s /usr/include/locale.h /usr/include/xlocale.h
|
2016-12-18 15:54:37 +01:00
|
|
|
|
2016-12-21 14:33:13 +01:00
|
|
|
ENV LC_ALL C.UTF-8
|
2016-12-18 15:54:37 +01:00
|
|
|
|
|
|
|
COPY src /c3nav/src
|
|
|
|
WORKDIR /c3nav/src
|
|
|
|
|
|
|
|
COPY deployment/docker/c3nav.bash /usr/local/bin/c3nav
|
2016-12-21 14:33:13 +01:00
|
|
|
|
2016-12-22 21:55:22 +01:00
|
|
|
RUN pip install -U pip wheel setuptools
|
2016-12-23 00:08:06 +01:00
|
|
|
RUN pip install matplotlib --only-binary :all:
|
|
|
|
RUN pip install -r requirements.txt -r requirements/production-extra.txt -r requirements/htmlmin.txt
|
|
|
|
-r requirements/postgres.txt -r requirements/memcached.txt -r requirements/redis.txt gunicorn \
|
|
|
|
|
2016-12-21 14:33:13 +01:00
|
|
|
&& chmod +x /usr/local/bin/c3nav
|
2016-12-18 15:54:37 +01:00
|
|
|
|
2016-12-22 21:55:22 +01:00
|
|
|
RUN python manage.py collectstatic --no-input \
|
|
|
|
&& python manage.py compress \
|
2016-12-22 20:00:46 +01:00
|
|
|
&& python manage.py compilemessages
|
2016-12-18 15:54:37 +01:00
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
ENTRYPOINT ["c3nav"]
|
|
|
|
CMD ["all"]
|