-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
36 lines (27 loc) · 1.14 KB
/
Dockerfile
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
33
34
35
36
FROM azul/zulu-openjdk-alpine:17.0.8.1-17.44.53-jre as builder
WORKDIR /app
ARG JAR_FILE
ADD ${JAR_FILE} app.jar
RUN java -Djarmode=layertools -jar app.jar extract
FROM azul/zulu-openjdk-alpine:17.0.8.1-17.44.53-jre
LABEL maintainer="[email protected]"
ARG HELM_VERSION="v3.12.3"
ARG HELM_GCS_VERSION="0.4.2"
RUN java -Xshare:dump
# Install Helm + Helm GCS
RUN apk add --update --no-cache curl ca-certificates git && \
curl -L "https://get.helm.sh/helm-$HELM_VERSION-linux-amd64.tar.gz" | tar xvz && \
mv linux-amd64/helm /usr/bin/helm && \
chmod +x /usr/bin/helm && \
helm plugin install https://github.com/hayorov/helm-gcs --version $HELM_GCS_VERSION && \
rm -rf linux-amd64 && \
apk del curl git && \
rm -f /var/cache/apk/*
# Add O-Neko
WORKDIR /app
COPY --from=builder /app/dependencies/ ./
COPY --from=builder /app/spring-boot-loader/ ./
COPY --from=builder /app/snapshot-dependencies/ ./
COPY --from=builder /app/application/ ./
ENV JDK_JAVA_OPTIONS ""
ENTRYPOINT ["java", "-noverify", "-Xshare:on", "-XX:TieredStopAtLevel=1", "-Djava.security.egd=file:/dev/./urandom", "org.springframework.boot.loader.JarLauncher"]