Spotter-VM/lxc-apps/ckan/ckan.image

49 lines
2.0 KiB
Plaintext
Raw Normal View History

2020-03-13 20:10:24 +01:00
IMAGE ckan_2.8.3-200313
FROM alpine3.11-python2.7_2.7.16-200313
2018-09-05 17:41:38 +02:00
2018-09-12 16:08:10 +02:00
RUN EOF
2018-09-05 17:41:38 +02:00
# Install runtime dependencies
2020-03-13 20:10:24 +01:00
apk --no-cache add geos libjpeg-turbo libmagic libpq mailcap py2-pip zlib
2018-09-05 17:41:38 +02:00
# Install build dependencies
apk --no-cache add --virtual .deps build-base git libjpeg-turbo-dev libxml2-dev libxslt-dev postgresql-dev python2-dev zlib-dev
# Install CKAN
mkdir -p /srv/ckan
cd /srv/ckan
pip install -U setuptools
pip install flask-debugtoolbar
2020-03-13 20:10:24 +01:00
pip install -e 'git+https://github.com/ckan/ckan.git@8e1cc60b2fa11da6843051678b7ee2cc08c2a7a9#egg=ckan'
2020-03-13 20:19:26 +01:00
pip install -r /srv/ckan/src/ckan/requirements.txt
2018-09-05 17:41:38 +02:00
# 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-geoview/pip-requirements.txt
2018-09-05 17:41:38 +02:00
pip install -r /srv/ckan/src/ckanext-dgvat-xls/requirements.txt
2020-03-13 22:55:12 +01:00
# Hackfix support for PostgreSQL 12
# https://github.com/sqlalchemy/sqlalchemy/issues/4463
sed -i 's/cons\.consrc/pg_get_constraintdef(cons.oid)/' /usr/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/base.py
2018-09-05 17:41:38 +02:00
# Create OS user
2019-09-18 11:29:58 +02:00
addgroup -S -g 8080 ckan
adduser -S -u 8080 -h /srv/ckan -s /bin/false -g ckan -G ckan ckan
2018-09-05 17:41:38 +02:00
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-09-12 16:08:10 +02:00
EOF
2018-09-05 17:41:38 +02:00
2020-03-13 20:10:24 +01:00
COPY ckan.image.d
2018-09-05 17:41:38 +02:00
2020-02-09 15:54:46 +01:00
CMD /bin/s6-svscan /etc/services.d