48 lines
1.6 KiB
Docker
48 lines
1.6 KiB
Docker
FROM debian:stable-slim
|
|
|
|
ENV TOMCAT_TARBALL_LINK https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.73/bin/apache-tomcat-9.0.73.tar.gz
|
|
ENV TOMCAT_DIRECTORY apache-tomcat-9.0.73
|
|
|
|
RUN apt-get update && apt-get dist-upgrade -y
|
|
|
|
RUN apt-get -y install openjdk-11-jdk openjdk-11-jre
|
|
|
|
RUN addgroup tomcat
|
|
RUN adduser tomcat --ingroup tomcat --home /opt/tomcat --shell /usr/bin
|
|
|
|
RUN apt-get -y install wget
|
|
|
|
RUN wget -O /tmp/tomcat.tar.gz $TOMCAT_TARBALL_LINK
|
|
RUN tar -zxvf /tmp/tomcat.tar.gz
|
|
|
|
WORKDIR /opt/tomcat
|
|
RUN mv /$TOMCAT_DIRECTORY/* /opt/tomcat/
|
|
|
|
RUN chown -R tomcat:tomcat /opt/tomcat
|
|
|
|
COPY fcrepo/setenv.sh /opt/tomcat/bin/setenv.sh
|
|
|
|
COPY fcrepo/tomcat.service /etc/systemd/system/tomcat.service
|
|
|
|
## Fedora
|
|
|
|
COPY fcrepo/i8_namespaces.cnd /opt/fcrepo/config/i8_namespaces.cnd
|
|
COPY fcrepo/allowed_hosts.txt /opt/fcrepo/config/allowed_hosts.txt
|
|
COPY fcrepo/repository.json /opt/fcrepo/config/repository.json
|
|
COPY fcrepo/fcrepo-config.xml /opt/fcrepo/config/fcrepo-config.xml
|
|
COPY fcrepo/tomcat-users.xml /opt/tomcat/conf/tomcat-users.xml
|
|
|
|
RUN mkdir -p /opt/fcrepo/data/objects
|
|
RUN mkdir -p /opt/fcrepo/config
|
|
RUN chown -R tomcat:tomcat /opt/fcrepo
|
|
|
|
ENV FCREPO_WAR_URL https://github.com/fcrepo/fcrepo/releases/download/fcrepo-6.3.0/fcrepo-webapp-6.3.0.war
|
|
RUN wget -O fcrepo.war $FCREPO_WAR_URL
|
|
RUN mv fcrepo.war /opt/tomcat/webapps
|
|
RUN chown tomcat:tomcat /opt/tomcat/webapps/fcrepo.war
|
|
|
|
## Migrationo Tools
|
|
RUN wget -O migration-utils.jar https://github.com/fcrepo-exts/migration-utils/releases/download/migration-utils-6.3.0/migration-utils-6.3.0-driver.jar
|
|
|
|
ENTRYPOINT /opt/tomcat/bin/catalina.sh run
|