-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.solrwayback
46 lines (35 loc) · 1.64 KB
/
Dockerfile.solrwayback
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
# This dockerfile builds a tomcat container including the webapps
# from the solrwayback bundle.
#
# See https://hub.docker.com/_/tomcat for details on how to configure tomcat.
ARG SOLRWAYBACK_VERSION=5.1.0
ARG SOLRWAYBACK_TOMCAT_VERSION=9
ARG TOMCAT_TAG=9-jre17-temurin-jammy
FROM ubuntu:24.04 as solrwayback-bundle
ARG SOLRWAYBACK_VERSION
ARG SOLRWAYBACK_TOMCAT_VERSION
RUN apt-get update && apt-get install -y \
unzip \
wget
WORKDIR /build
RUN wget -q https://github.com/netarchivesuite/solrwayback/releases/download/${SOLRWAYBACK_VERSION}/solrwayback_package_${SOLRWAYBACK_VERSION}.zip
RUN unzip solrwayback_package_${SOLRWAYBACK_VERSION}.zip && mv solrwayback_package_${SOLRWAYBACK_VERSION} bundle/ \
&& mkdir /webapps \
&& unzip bundle/tomcat-${SOLRWAYBACK_TOMCAT_VERSION}/webapps/solrwayback.war -d /webapps/solrwayback \
&& cp bundle/tomcat-${SOLRWAYBACK_TOMCAT_VERSION}/webapps/ROOT.war /webapps/ROOT.war
FROM tomcat:${TOMCAT_TAG}
# CATALINA_HOME is the folder where catalina is installed.
# The main component of tomcat is called catalina.
# CATALINA_HOME is set by the tomcat image.
# Copy the extracted solrwayback.war file
# We use the extracted solrwayback.war to be able to customize the web
# application (favicon, etc.) at runtime (using overlays).
COPY --from=solrwayback-bundle \
/webapps/solrwayback \
${CATALINA_HOME}/webapps/solrwayback
# Copy ROOT.war to the webapps folder of tomcat.
COPY --from=solrwayback-bundle \
/webapps/ROOT.war \
${CATALINA_HOME}/webapps/ROOT.war
# Copy the properties files from the solrwayback bundle to the root user home folder.
COPY --from=solrwayback-bundle /build/bundle/properties/* /root