Combining base Dockerfile with main dockerfile so that there is a single image related to hapi-jpaserver-starter

This commit is contained in:
Sean McIlvenna
2020-08-14 11:14:28 -07:00
parent ece1199c5f
commit af6bd69db0
2 changed files with 17 additions and 15 deletions

View File

@@ -1,10 +1,25 @@
FROM hapiproject/hapi:base as build-hapi
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}
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.3/bin/mvn clean install -DskipTests
FROM tomcat:9-jre11

View File

@@ -1,13 +0,0 @@
FROM ubuntu
ENV PATH="/tmp/apache-maven-3.6.0/bin:${PATH}"
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://www-us.apache.org/dist/maven/maven-3/3.6.2/binaries/apache-maven-3.6.2-bin.tar.gz && tar xzf apache-maven-3.6.2-bin.tar.gz
RUN export PATH=/tmp/apache-maven-3.6.2/bin:${PATH}