28 lines
1.1 KiB
Docker
28 lines
1.1 KiB
Docker
FROM alpine:3.7
|
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
|
|
|
RUN apk --no-cache add python2
|
|
|
|
RUN apk --no-cache add libxml2 libxslt
|
|
|
|
RUN apk --no-cache add libffi libressl libxml2 libxslt uwsgi-python \
|
|
&& apk --no-cache add --virtual .deps build-base git libffi-dev libressl-dev libxml2-dev libxslt-dev py2-pip python2-dev \
|
|
&& mkdir -p /srv/ckan-datapusher \
|
|
&& cd /srv/ckan-datapusher \
|
|
&& pip install -U setuptools \
|
|
&& pip install -e 'git+https://github.com/ckan/datapusher.git#egg=datapusher' \
|
|
&& pip install -r /srv/ckan-datapusher/src/datapusher/requirements.txt \
|
|
&& addgroup -S -g 8004 ckan-datapusher \
|
|
&& adduser -S -u 8004 -h /srv/ckan-datapusher -s /bin/false -g ckan-datapusher -G ckan-datapusher ckan-datapusher \
|
|
&& chown -R ckan-datapusher:ckan-datapusher /srv/ckan-datapusher \
|
|
&& apk del .deps \
|
|
&& find /srv/ckan-datapusher/src -name '.git*' -exec rm -rf {} + \
|
|
&& rm -rf /root \
|
|
&& mkdir /root
|
|
|
|
VOLUME ["/etc/ckan-datapusher", "/srv/ckan-datapusher/data"]
|
|
EXPOSE 8004
|
|
|
|
USER ckan-datapusher
|
|
CMD ["uwsgi", "--plugin", "python", "--http-socket", "0.0.0.0:8004", "--wsgi-file", "/etc/ckan-datapusher/datapusher.wsgi", "--enable-threads"]
|