annotate docker/Dockerfile.wiki @ 9803:a440ebd5c23b 3.2.x tip

Avoid using outdated mod_wsgi in Docker setup Run Wiki in standalone mode behind reverse proxy, which is provided by a more up-to-date Apache web server. The wiki container is still based on CentOS 7, because the included SSO integration component cannot be build with more recent libraries.
author Tom Gottfried <tom@intevation.de>
date Wed, 21 Aug 2024 16:54:17 +0200
parents 414647dc6936
children
rev   line source
9739
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
1 # Docker file for D4E River documentation wiki
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
2 FROM centos:7
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
3 MAINTAINER tom@intevation.de
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
4
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
5 # Necessary to run further yum-installs inside Docker container,
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
6 # if not already part of the base image:
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
7 RUN yum -q -y install yum-plugin-ovl && rpm --rebuilddb
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
8
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
9 # Install prerequisites
9803
a440ebd5c23b Avoid using outdated mod_wsgi in Docker setup
Tom Gottfried <tom@intevation.de>
parents: 9739
diff changeset
10 RUN yum -q -y install curl ca-certificates tar gzip \
a440ebd5c23b Avoid using outdated mod_wsgi in Docker setup
Tom Gottfried <tom@intevation.de>
parents: 9739
diff changeset
11 python-setuptools gcc python-devel xmlsec1-nss-devel libtool-ltdl-devel
9739
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
12 WORKDIR /opt/xmlsec
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
13 RUN curl -sL https://pypi.python.org/packages/source/p/pyxmlsec-next/pyxmlsec-next-0.3.1.tar.gz | \
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
14 tar -xz
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
15 WORKDIR pyxmlsec-next-0.3.1
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
16 RUN echo 3 | python setup.py build install
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
17
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
18 WORKDIR /opt/wiki
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
19
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
20 # User for wiki installation and WSGI
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
21 RUN useradd wiki
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
22 RUN chown wiki:wiki .
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
23 USER wiki
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
24
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
25 # Install MoinMoin
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
26 RUN curl -s https://static.moinmo.in/files/moin-1.9.9.tar.gz | tar -xz
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
27 ENV WIKI /opt/wiki/moin-1.9.9
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
28
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
29 # Install tool for SSO
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
30 RUN curl -s https://hg.intevation.de/moin/moin-was/archive/default.tar.gz | \
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
31 tar -xz -C $WIKI/MoinMoin/auth --strip-components=1 moin-was-default/was.py
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
32
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
33 # Volume for Wiki data
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
34 VOLUME $WIKI/wiki/data
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
35
9803
a440ebd5c23b Avoid using outdated mod_wsgi in Docker setup
Tom Gottfried <tom@intevation.de>
parents: 9739
diff changeset
36 ENV PYTHONPATH $WIKI
9739
414647dc6936 Add wiki to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
37
9803
a440ebd5c23b Avoid using outdated mod_wsgi in Docker setup
Tom Gottfried <tom@intevation.de>
parents: 9739
diff changeset
38 CMD ["/opt/wiki/moin-1.9.9/wiki/server/moin", "server", "standalone", \
a440ebd5c23b Avoid using outdated mod_wsgi in Docker setup
Tom Gottfried <tom@intevation.de>
parents: 9739
diff changeset
39 "--hostname="]

http://dive4elements.wald.intevation.org