Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Added Dockerfile that builds DataHelix inside its own dockerfile envi…
Browse files Browse the repository at this point in the history
…ronment and generates a docker container that only contains the fatJar executable and the Java 8 JRE.
  • Loading branch information
sroebuck committed Jun 11, 2019
1 parent 6288cce commit 2b0c0d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM openjdk:8u212-jdk-stretch AS build

WORKDIR /root

ENV GRADLE_HOME /opt/gradle
ENV GRADLE_VERSION 5.4.1

RUN wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip"
RUN unzip gradle.zip
RUN rm gradle.zip
RUN mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/"
RUN ln --symbolic "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle

COPY . /root/

RUN gradle fatJar

FROM openjdk:8u212-jre-alpine

WORKDIR /root
COPY --from=build /root/orchestrator/build/libs/generator.jar .

ENTRYPOINT ["java", "-jar", "generator.jar"]
3 changes: 3 additions & 0 deletions docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash

docker build . --tag "datahelix"

0 comments on commit 2b0c0d4

Please sign in to comment.