forked from MarquezProject/marquez
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.java
More file actions
32 lines (28 loc) · 996 Bytes
/
Dockerfile.java
File metadata and controls
32 lines (28 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM eclipse-temurin:17 AS base
WORKDIR /usr/src/app
COPY gradle gradle
COPY gradle.properties gradle.properties
COPY gradlew gradlew
COPY settings.gradle settings.gradle
RUN chmod +x ./gradlew
RUN sed -i 's/\r$//' ./gradlew
FROM base AS build
WORKDIR /usr/src/app
COPY build.gradle build.gradle
COPY api ./api
COPY clients/java ./clients/java
RUN ./gradlew clean :api:shadowJar --no-daemon --refresh-dependencies
FROM eclipse-temurin:17-jre-ubi10-minimal
# Install required runtime tools on UBI minimal and clean up cache
RUN microdnf -y update && \
microdnf -y install postgresql bash dos2unix && \
microdnf -y clean all
WORKDIR /usr/src/app
COPY --from=build /usr/src/app/api/build/libs/marquez-*.jar /usr/src/app
COPY marquez.dev.yml marquez.dev.yml
COPY docker/entrypoint.sh entrypoint.sh
COPY docker/wait-for-it.sh wait-for-it.sh
RUN dos2unix entrypoint.sh wait-for-it.sh && \
chmod +x entrypoint.sh wait-for-it.sh
EXPOSE 5000 5001
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]