-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (32 loc) · 1.33 KB
/
Dockerfile
File metadata and controls
44 lines (32 loc) · 1.33 KB
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
FROM jetty:12-jre21-eclipse-temurin
ARG DIGILIB_VERSION_URL="https://github.com/robcast/digilib/releases/download/release-2.13.0/digilib-webapp-2.13.0.war"
ENV JETTY_WEBAPPS=${JETTY_BASE}/webapps
# set default location for images inside the Docker container
ENV DIGILIB_BASEDIR_LIST="/var/lib/digilib/images"
# add default IIIF options
ENV DIGILIB_IIIF_API_VERSION="2.1"
ENV DIGILIB_IIIF_INFO_CORS="true"
ENV DIGILIB_IIIF_IMAGE_CORS="true"
ENV DIGILIB_IIIF_PREFIX="IIIF"
ENV DIGILIB_IIIF_SLASH_REPLACEMENT="!"
ADD ${DIGILIB_VERSION_URL} tmp.war
ADD entrypoint.sh .
USER root:root
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends unzip && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p ${JETTY_WEBAPPS}/ROOT \
&& mkdir -p /var/lib/digilib/images \
&& unzip -q tmp.war -d ${JETTY_WEBAPPS}/ROOT/ \
&& cp ${JETTY_WEBAPPS}/ROOT/WEB-INF/digilib-config.xml.template ${JETTY_WEBAPPS}/ROOT/WEB-INF/digilib-config.xml \
&& rm tmp.war \
&& chmod 755 entrypoint.sh \
&& chown -R jetty:jetty ${JETTY_WEBAPPS}/ROOT
#ADD jetty.xml $JETTY_BASE/etc/jetty.xml
USER jetty:jetty
# enables webapp deployment for Jetty12 from the `$JETTY_BASE/webapps`
RUN java -jar $JETTY_HOME/start.jar --add-modules=ee8-deploy,ee8-jsp
VOLUME ["/var/lib/digilib/images"]
EXPOSE 8080
ENTRYPOINT ["./entrypoint.sh"]