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

35 lines
1.1 KiB
Plaintext
Raw Normal View History

IMAGE ckan_2.9.1-210106
FROM alpine3.12-python3.8_3.8.5-210106
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
apk --no-cache add geos libjpeg-turbo libmagic libpq mailcap 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 python3-dev zlib-dev
2018-09-05 17:41:38 +02:00
# Install CKAN
mkdir -p /srv/ckan
cd /srv/ckan
pip install -e 'git+https://github.com/ckan/ckan.git@bb272bfc7167b35cbff8ce48ed815dd4e23597ba#egg=ckan'
# Hackfix support for python3.7+ and setuptools 46+
sed -i 's/zope\.interface==4\.3\.2/zope.interface==4.7.2/' /srv/ckan/src/ckan/requirements.txt
# -I allows dependencies to downgrade six
pip install -Ir /srv/ckan/src/ckan/requirements.txt
2018-09-05 17:41:38 +02:00
pip install flask-debugtoolbar
2020-03-13 22:55:12 +01:00
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