Spotter-VM/ckan/Dockerfile

47 lines
2.0 KiB
Docker
Raw Normal View History

2018-04-30 22:57:50 +02:00
FROM python2
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
RUN \
2018-01-27 22:46:45 +01:00
# Add edge/testing repository
echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories \
# Install runtime dependencies
2018-04-30 22:57:50 +02:00
&& apk --no-cache add geos@edge libjpeg-turbo libmagic libpq mailcap py2-pip zlib
2018-01-08 21:04:35 +01:00
RUN \
# Install build dependencies
2018-01-27 15:23:22 +01:00
apk --no-cache add --virtual .deps build-base git libjpeg-turbo-dev libxml2-dev libxslt-dev postgresql-dev python2-dev zlib-dev \
# Hackfix for python find_library('c') call
&& ln -s /lib/ld-musl-x86_64.so.1 /lib/libc.so.1 \
# Install CKAN
&& mkdir -p /srv/ckan \
&& cd /srv/ckan \
&& pip install -U setuptools \
2018-07-15 20:47:02 +02:00
&& pip install flask-debugtoolbar \
2018-08-10 21:04:22 +02:00
&& pip install -e 'git+https://github.com/ckan/ckan.git#egg=ckan' \
&& pip install -r /srv/ckan/src/ckan/requirements.txt \
# Install CKAN extensions
&& pip install -e 'git+https://github.com/ckan/ckanext-basiccharts#egg=ckanext_basiccharts' \
&& pip install -e 'git+https://github.com/ckan/ckanext-spatial#egg=ckanext_spatial' \
&& pip install -e 'git+https://github.com/ckan/ckanext-geoview#egg=ckanext_geoview' \
&& pip install -e 'git+https://github.com/ckan/ckanext-mapviews#egg=ckanext_mapviews' \
&& pip install -e 'git+https://github.com/XVTSolutions/ckanext-spatialUI#egg=ckanext_spatialui' \
&& pip install -e 'git+https://github.com/aptivate/ckanext-datasetthumbnail#egg=ckanext_datasetthumbnail' \
&& pip install -e 'git+https://github.com/datagvat/ckanext-dgvat_xls#egg=ckanext_dgvat_xls' \
&& pip install -r /srv/ckan/src/ckanext-spatial/pip-requirements.txt \
&& pip install -r /srv/ckan/src/ckanext-dgvat-xls/requirements.txt \
# Create OS user
&& addgroup -S -g 8003 ckan \
&& adduser -S -u 8003 -h /srv/ckan -s /bin/false -g ckan -G ckan ckan \
&& chown -R ckan:ckan /srv/ckan \
# Cleanup
&& apk --no-cache del .deps \
&& find /srv/ckan/src -name '.git*' -exec rm -rf {} + \
&& rm -rf /root/.cache
2018-04-30 22:02:54 +02:00
COPY docker/ /
VOLUME ["/etc/ckan", "/srv/ckan/storage"]
2018-03-25 22:55:15 +02:00
EXPOSE 8080
2018-04-30 22:02:54 +02:00
CMD ["s6-svscan", "/etc/services.d"]