-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
33 lines (26 loc) · 1.22 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
FROM frekele/ant:1.10-jdk8 as builder
WORKDIR /usr/local
RUN curl --location 'https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.58/bin/apache-tomcat-9.0.58.tar.gz' | tar xz
RUN cd apache-tomcat* && echo "catalina.home=$(pwd)" > ~/build.properties
COPY . /tmp/joai-project
WORKDIR /tmp/joai-project
RUN ant dist
RUN mkdir /war
WORKDIR /war
RUN unzip /tmp/joai-project/dist/oai.war
# stage 2
FROM tomcat:9-jre8-alpine
LABEL author="Tom Saleeba"
WORKDIR /usr/local/tomcat/webapps
COPY --from=builder /war/ ./ROOT/
RUN \
wget -O ../lib/woodstox-core-5.0.3.jar 'https://search.maven.org/remotecontent?filepath=com/fasterxml/woodstox/woodstox-core/5.0.3/woodstox-core-5.0.3.jar' && \
wget -O ../lib/stax2-api-4.0.0.jar 'https://search.maven.org/remotecontent?filepath=org/codehaus/woodstox/stax2-api/4.0.0/stax2-api-4.0.0.jar' && \
rm -r docs/ examples/ host-manager/ manager/ && \
mkdir -p /joai/config/harvester /joai/config/repository && \
ln -s /joai/config/harvester /usr/local/tomcat/webapps/ROOT/WEB-INF/harvester_settings_and_data && \
ln -s /joai/config/repository /usr/local/tomcat/webapps/ROOT/WEB-INF/repository_settings_and_data
# just the config
VOLUME /joai/config
# the harvested/provided records
VOLUME /joai/data