blob: 6dbf84f57083fb1974f7980e3bc473d6d46e5fbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
FROM docker.io/alpine:3.10
LABEL maintainer="Mike Crute <mike@crute.us>"
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"]
|