2020-12-02 17:40:12 -08:00
|
|
|
# Defining environment
|
|
|
|
|
ARG APP_ENV=prod
|
|
|
|
|
|
|
|
|
|
FROM openjdk:8-jre-alpine as base
|
|
|
|
|
|
|
|
|
|
FROM openjdk:8 as prod-build
|
2019-12-16 12:05:42 -08:00
|
|
|
COPY . datahub-src
|
2020-09-25 14:05:29 -07:00
|
|
|
RUN cd datahub-src && ./gradlew :metadata-ingestion-examples:mce-cli:build
|
2020-06-05 14:39:20 -07:00
|
|
|
|
2020-12-02 17:40:12 -08:00
|
|
|
FROM base as prod-install
|
|
|
|
|
COPY --from=prod-build datahub-src/metadata-ingestion-examples/mce-cli/build/libs/mce-cli.jar /datahub/ingestion/bin/mce-cli.jar
|
|
|
|
|
COPY --from=prod-build datahub-src/metadata-ingestion-examples/mce-cli/example-bootstrap.json /datahub/ingestion/example-bootstrap.json
|
|
|
|
|
|
|
|
|
|
FROM base as dev-install
|
|
|
|
|
# Dummy stage for development. Assumes code is built on your machine and mounted to this image.
|
|
|
|
|
# See this excellent thread https://github.com/docker/cli/issues/1134
|
|
|
|
|
|
|
|
|
|
FROM ${APP_ENV}-install as final
|
|
|
|
|
CMD java -jar /datahub/ingestion/bin/mce-cli.jar -m produce /datahub/ingestion/example-bootstrap.json
|