Skip to content

Commit

Permalink
Merge pull request #379 from edmcouncil/378-fibo-651-update-java-to-2…
Browse files Browse the repository at this point in the history
…1-for-onto-viewer-dockerfile

[FIBO-651] Update Java to 21 for onto-viewer in Dockerfile
  • Loading branch information
mereolog authored Jan 26, 2024
2 parents c69f71f + 5128aad commit fd11267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM maven:3.8.1-jdk-11-openj9 AS build-onto-viewer
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get -y install curl unzip zip && \
ARG ONTPUB_FAMILY=dev
ARG UPDATE_URL

FROM maven:3-eclipse-temurin-21-alpine AS build-onto-viewer
RUN apk --no-cache add --upgrade bash curl unzip zip && \
mkdir -p /opt/develop
WORKDIR /opt/develop
COPY . /opt/develop/
RUN mvn clean package && cp -av onto-viewer-web-app/target/onto-viewer-web-app-*.war /onto-viewer-web-app.war
RUN mvn -ntp clean package && cp -av onto-viewer-web-app/target/onto-viewer-web-app-*.war /onto-viewer-web-app.war

FROM adoptopenjdk/openjdk11-openj9:alpine-slim
ARG ONTPUB_FAMILY=dev UPDATE_URL
FROM eclipse-temurin:21-jdk-alpine
ARG ONTPUB_FAMILY UPDATE_URL
ENV ONTPUB_FAMILY="${ONTPUB_FAMILY}" UPDATE_URL="${UPDATE_URL}"
RUN apk --no-cache add --upgrade bash curl jq && \
install -d /opt/viewer/config
Expand Down
2 changes: 1 addition & 1 deletion onto-viewer-web-app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

echo "[INFO] Starting app.war..."
exec java -server -Xmx4G -XX:-UseGCOverheadLimit -Dserver.address=0.0.0.0 -Dserver.port=80 -Dserver.forward-headers-strategy=native -Dserver.tomcat.redirect-context-root=false \
${UPDATE_URL:+ -Dapp.config.ontologies.download_directory=download -Dapp.config.updateUrl=${UPDATE_URL}} -jar onto-viewer.war --server.servlet.context-path=/${ONTPUB_FAMILY:-dev}/ontology
${UPDATE_URL:+ -Dapp.config.updateUrl=${UPDATE_URL}} -jar onto-viewer.war --server.servlet.context-path=/${ONTPUB_FAMILY:-dev}/ontology

0 comments on commit fd11267

Please sign in to comment.