Skip to content

Commit

Permalink
test: troubleshooting build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlukasse committed Sep 20, 2023
1 parent bb9c10d commit 0bc22c1
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,3 @@ RUN mvn package \
&& jar -xf WebAPI.war \
&& rm WebAPI.war

# OHDSI WebAPI and ATLAS web application running as a Spring Boot application with Java 11
FROM quay.io/cdis/eclipse-temurin:8-jre-focal

MAINTAINER Lee Evans - www.ltscomputingllc.com

# Any Java options to pass along, e.g. memory, garbage collection, etc.
ENV JAVA_OPTS=""
# Additional classpath parameters to pass along. If provided, start with colon ":"
ENV CLASSPATH=""
# Default Java options. The first entry is a fix for when java reads secure random numbers:
# in a containerized system using /dev/random may reduce entropy too much, causing slowdowns.
# https://ruleoftech.com/2016/avoiding-jvm-delays-caused-by-random-number-generation
ENV DEFAULT_JAVA_OPTS="-Djava.security.egd=file:///dev/./urandom"

# set working directory to a fixed WebAPI directory
WORKDIR /var/lib/ohdsi/webapi

COPY --from=builder /code/opentelemetry-javaagent.jar .

# deploy the just built OHDSI WebAPI war file
# copy resources in order of fewest changes to most changes.
# This way, the libraries step is not duplicated if the dependencies
# do not change.
COPY --from=builder /code/war/WEB-INF/lib*/* WEB-INF/lib/
COPY --from=builder /code/war/org org
COPY --from=builder /code/war/WEB-INF/classes WEB-INF/classes
COPY --from=builder /code/war/META-INF META-INF

EXPOSE 8080

USER 101

# Directly run the code as a WAR.
CMD exec java ${DEFAULT_JAVA_OPTS} ${JAVA_OPTS} \
-cp ".:WebAPI.jar:WEB-INF/lib/*.jar${CLASSPATH}" \
org.springframework.boot.loader.WarLauncher

0 comments on commit 0bc22c1

Please sign in to comment.