Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #124

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@
FROM ubuntu as build-hapi

ENV PATH="/tmp/apache-maven-3.6.0/bin:${PATH}"

ENV TZ=Etc/UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR /tmp
RUN apt-get update && \
apt-get install git -y && \
apt-get install sed -y && \
apt-get install wget -y && \
apt-get install openjdk-11-jdk -y

RUN wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && tar xzf apache-maven-3.6.3-bin.tar.gz
RUN export PATH=/tmp/apache-maven-3.6.3/bin:${PATH}

FROM maven:3.6.3-jdk-11-slim as build-hapi
WORKDIR /tmp/hapi-fhir-jpaserver-starter

COPY . .
COPY pom.xml .
RUN mvn dependency:go-offline

RUN /tmp/apache-maven-3.6.3/bin/mvn clean install -DskipTests
COPY src/ /tmp/hapi-fhir-jpaserver-starter/src/
RUN mvn clean install -DskipTests
seanmcilvenna marked this conversation as resolved.
Show resolved Hide resolved

FROM tomcat:9-jre11
FROM tomcat:9.0.37-jdk11-openjdk-slim-buster

RUN mkdir -p /data/hapi/lucenefiles && chmod 775 /data/hapi/lucenefiles
COPY --from=build-hapi /tmp/hapi-fhir-jpaserver-starter/target/*.war /usr/local/tomcat/webapps/

EXPOSE 8080

CMD ["catalina.sh", "run"]
CMD ["catalina.sh", "run"]