forked from peterstadler/oxgarage-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (43 loc) · 2.23 KB
/
Dockerfile
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
FROM tomcat:7-jre8
ENV TOMCAT_WEBAPPS "$CATALINA_HOME"/webapps
ENV OFFICE_HOME /usr/lib/libreoffice
# current Stylesheets stable (= master branch) version
ENV STYLESHEETS_URL http://jenkins.tei-c.org/job/Stylesheets/lastSuccessfulBuild/artifact/tei-xsl-7.43.0.zip
# current TEI Guidelines stable (= master branch) version
ENV GUIDELINES_URL http://jenkins.tei-c.org/job/TEIP5/lastSuccessfulBuild/artifact/P5/tei-3.2.0.zip
USER root:root
COPY oxgarage.properties /etc/
COPY log4j.xml /var/cache/oxgarage/log4j.xml
# Tip: downloading large files with "curl -L <URL> -o <file>" (rather than with ADD) allows for the files to be fully cached
RUN curl -L $STYLESHEETS_URL -o /tmp/tei-xsl.zip
RUN curl -L $GUIDELINES_URL -o /tmp/tei.zip
COPY ege-webclient-0.3.war /tmp/ege-webclient.war
COPY ege-webservice-0.5.2.war /tmp/ege-webservice.war
RUN unzip -q /tmp/tei-xsl.zip -d /usr/share/ \
&& rm -Rf /tmp/tei-xsl.zip \
&& unzip -q /tmp/tei.zip -d /usr/share/ \
&& rm -Rf /tmp/tei.zip \
/usr/share/doc/tei-* \
/usr/share/xml/tei/Exemplars \
/usr/share/xml/tei/Test \
/usr/share/xml/tei/xquery \
/usr/share/xml/tei/odd/Utilities \
/usr/share/xml/tei/odd/ReleaseNotes \
/usr/share/xml/tei/custom/templates
RUN mkdir "$TOMCAT_WEBAPPS"/ege-webclient \
&& unzip -q /tmp/ege-webclient.war -d "$TOMCAT_WEBAPPS"/ege-webclient/ \
&& rm /tmp/ege-webclient.war
RUN mkdir "$TOMCAT_WEBAPPS"/ege-webservice \
&& unzip -q /tmp/ege-webservice.war -d "$TOMCAT_WEBAPPS"/ege-webservice/ \
&& rm /tmp/ege-webservice.war
# https://www.howtoinstall.co/en/ubuntu/xenial/fonts-noto
RUN apt-get update -qq && apt-get install -y apt-utils libreoffice \
ttf-dejavu \
ttf-linux-libertine \
fonts-noto \
procps \
&& ln -s $OFFICE_HOME /usr/lib/openoffice
COPY webservice_web.xml "$TOMCAT_WEBAPPS"/ege-webservice/WEB-INF/web.xml
# add some Jetty jars needed for CORS support
ADD http://central.maven.org/maven2/org/eclipse/jetty/jetty-servlets/9.4.7.v20170914/jetty-servlets-9.4.7.v20170914.jar "$TOMCAT_WEBAPPS"/ege-webservice/WEB-INF/lib/
ADD http://central.maven.org/maven2/org/eclipse/jetty/jetty-util/9.4.7.v20170914/jetty-util-9.4.7.v20170914.jar "$TOMCAT_WEBAPPS"/ege-webservice/WEB-INF/lib/