From 797d574e5547751b17d86754f7af5211b3c623f3 Mon Sep 17 00:00:00 2001 From: chgl Date: Tue, 12 May 2020 17:34:04 +0200 Subject: [PATCH] added container build support --- Dockerfile | 22 ++++++++++++++++++++++ README.md | 19 ++++++++++++------- 2 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..6e005aa4e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM maven:3.6.3-jdk-11 as build +WORKDIR /build +COPY lib ./lib +COPY pom.xml ./pom.xml +COPY org.hl7.fhir.publisher.cli/pom.xml ./org.hl7.fhir.publisher.cli/pom.xml +COPY org.hl7.fhir.publisher.core/pom.xml ./org.hl7.fhir.publisher.core/pom.xml +RUN mvn dependency:go-offline +COPY . . +RUN mvn install + +FROM openjdk:11-jre-buster +WORKDIR /usr/src/app + +RUN apt-get update && \ + apt-get install -y --no-install-recommends ruby ruby-all-dev build-essential && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + gem install jekyll + +COPY --from=build /build/org.hl7.fhir.publisher.cli/target/org.hl7.fhir.publisher.cli-*-SNAPSHOT.jar /usr/src/app/org.hl7.fhir.publisher.cli.jar +ENTRYPOINT ["java", "-jar", "/usr/src/app/org.hl7.fhir.publisher.cli.jar"] +CMD ["-?"] diff --git a/README.md b/README.md index 3106c4812..3db44632d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -HAPI FHIR - HL7 FHIR Core Artifacts -=================================== +# HAPI FHIR - HL7 FHIR Core Artifacts -# Building this Project +## Building this Project This project uses [Apache Maven](http://maven.apache.org) to build. To build: -``` +```sh mvn install ``` @@ -13,10 +12,16 @@ Note that unit tests will run, but are currently not set to fail the build as th To skip unit tests: -``` +```sh mvn -Dmaven.test.skip install ``` -== Maintenance +### Docker Build + +```sh +docker build -t fhir-ig-publisher:test . +``` + +## Maintenance -This project is maintained by Grahame Grieve and Lloyd Mckenzie on behalf of the FHIR community. \ No newline at end of file +This project is maintained by Grahame Grieve and Lloyd Mckenzie on behalf of the FHIR community.