Spotter-VM/ckan-datapusher/Dockerfile

34 lines
1.1 KiB
Docker
Raw Permalink Normal View History

2018-04-30 22:57:50 +02:00
FROM python2
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
2017-12-20 15:41:29 +01:00
RUN \
# Install runtime dependencies
2018-01-08 21:04:35 +01:00
apk --no-cache add libffi libressl uwsgi-python
RUN \
# Install build dependencies
2018-01-08 21:04:35 +01:00
apk --no-cache add --virtual .deps build-base git libffi-dev libressl-dev libxml2-dev libxslt-dev py2-pip python2-dev \
# Install CKAN DataPusher
2018-04-21 22:38:30 +02:00
&& mkdir -p /srv/ckan-datapusher \
&& cd /srv/ckan-datapusher \
2017-12-20 15:41:29 +01:00
&& pip install -U setuptools \
&& pip install -e 'git+https://github.com/ckan/datapusher.git#egg=datapusher' \
2018-02-01 17:45:43 +01:00
# Hackfix the X509_STORE_CTX wrapper
2018-04-21 22:38:30 +02:00
&& sed -i 's/\[security\]//' /srv/ckan-datapusher/src/datapusher/requirements.txt \
&& pip install -r /srv/ckan-datapusher/src/datapusher/requirements.txt \
# Create OS user
2018-03-25 14:18:01 +02:00
&& addgroup -S -g 8004 ckandp \
2018-04-21 22:38:30 +02:00
&& adduser -S -u 8004 -h /srv/ckan-datapusher -s /bin/false -g ckandp -G ckandp ckandp \
&& chown -R ckandp:ckandp /srv/ckan-datapusher \
# Cleanup
&& apk --no-cache del .deps \
2018-04-21 22:38:30 +02:00
&& find /srv/ckan-datapusher/src -name '.git*' -exec rm -rf {} + \
&& rm -rf /root/.cache
2017-12-20 15:41:29 +01:00
COPY docker/ /
2018-04-21 22:38:30 +02:00
VOLUME ["/etc/ckan-datapusher", "/srv/ckan-datapusher/data"]
2018-03-25 22:55:15 +02:00
EXPOSE 8080
2017-12-20 15:41:29 +01:00
CMD ["s6-svscan", "/etc/services.d"]