Updating Dockerfile to use context code instead of re-cloning the hapi-fhir-jpaserver-starter project. Still re-builds the base hapi libraries, though.

This commit is contained in:
Sean McIlvenna
2020-06-29 15:07:46 -07:00
parent a5c1769b91
commit 213bda7cfc

View File

@@ -2,18 +2,16 @@ FROM hapiproject/hapi:base as build-hapi
ARG HAPI_FHIR_URL=https://github.com/jamesagnew/hapi-fhir/ ARG HAPI_FHIR_URL=https://github.com/jamesagnew/hapi-fhir/
ARG HAPI_FHIR_BRANCH=master ARG HAPI_FHIR_BRANCH=master
ARG HAPI_FHIR_STARTER_URL=https://github.com/hapifhir/hapi-fhir-jpaserver-starter/
ARG HAPI_FHIR_STARTER_BRANCH=master
RUN git clone --branch ${HAPI_FHIR_BRANCH} ${HAPI_FHIR_URL} RUN git clone --branch ${HAPI_FHIR_BRANCH} ${HAPI_FHIR_URL}
WORKDIR /tmp/hapi-fhir/ WORKDIR /tmp/hapi-fhir/
RUN /tmp/apache-maven-3.6.2/bin/mvn dependency:resolve RUN /tmp/apache-maven-3.6.2/bin/mvn dependency:resolve
RUN /tmp/apache-maven-3.6.2/bin/mvn install -DskipTests RUN /tmp/apache-maven-3.6.2/bin/mvn install -DskipTests
WORKDIR /tmp
RUN git clone --branch ${HAPI_FHIR_STARTER_BRANCH} ${HAPI_FHIR_STARTER_URL}
WORKDIR /tmp/hapi-fhir-jpaserver-starter WORKDIR /tmp/hapi-fhir-jpaserver-starter
COPY . .
RUN /tmp/apache-maven-3.6.2/bin/mvn clean install -DskipTests RUN /tmp/apache-maven-3.6.2/bin/mvn clean install -DskipTests
FROM tomcat:9-jre11 FROM tomcat:9-jre11