FROM docker.io/alpine:3.10 LABEL maintainer="Mike Crute " ARG moin_version ADD patches/ /tmp/moin-patches # aspell-en (wamerican) needed? RUN set -euxo pipefail; \ # Install build dependencies apk --no-cache add --virtual .build-deps \ python2 \ unzip \ jpeg-dev \ zlib-dev \ tiff-dev \ freetype-dev \ lcms-dev \ libwebp-dev \ openjpeg-dev \ python2-dev \ build-base \ bash \ make \ git \ # Install distro-level dependencies && apk --no-cache add \ curl \ ssmtp \ python2 \ py2-pip \ xapian-bindings-python \ aspell-en \ uwsgi \ uwsgi-python \ su-exec \ # Install libimagequant manually as it's not packaged && cd /tmp \ && git clone --depth=1 https://github.com/ImageOptim/libimagequant.git \ && cd libimagequant \ && ./configure \ && make shared \ && mv libimagequant.h /usr/include \ && mv *.so* /usr/lib \ # Build the latest version of moin && cd /tmp \ && git clone https://github.com/moinwiki/moin-1.9.git \ && cd moin-1.9 \ && git checkout ${moin_version} \ && for p in /tmp/moin-patches/*; do \ patch -p1 < $p; \ done \ && make pagepacks \ && rm -rf tests \ && touch wiki/data/{edit,event}-log \ && python setup.py sdist \ # Install python dependencies && pip install \ markdown \ docutils \ textile \ pygments \ pillow \ /tmp/moin-1.9/dist/moin-*.tar.gz \ # Cleanup but also re-add dependencies since removing the dev packages also # removes the libraries (even if we install the libraries explicitly in # addition to the dev packages) && apk del .build-deps \ && apk --no-cache add \ python2 \ libjpeg \ zlib \ tiff \ freetype \ liblcms \ libwebp \ openjpeg \ && rm -rf /root/.cache /tmp/* ADD wiki-common /srv/wiki-common ADD entrypoint.sh / STOPSIGNAL SIGINT ENTRYPOINT [ "/entrypoint.sh" ] CMD ["/usr/sbin/uwsgi", "--ini", "/srv/wiki-common/config/uwsgi.ini"]