-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (45 loc) · 1.48 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
37
38
39
40
41
42
43
44
45
46
47
48
49
#FROM openjdk:17-alpine as app-build
#ENV RELEASE=17
#
#WORKDIR /opt/build
#COPY ./target/datum-0.0.4.jar ./application.jar
#
#RUN java -Djarmode=layertools -jar application.jar extract
#RUN $JAVA_HOME/bin/jlink \
# --add-modules `jdeps --ignore-missing-deps -q -recursive --multi-release ${RELEASE} --print-module-deps -cp 'dependencies/BOOT-INF/lib/*':'snapshot-dependencies/BOOT-INF/lib/*' application.jar` \
# --strip-debug \
# --no-man-pages \
# --no-header-files \
# --compress=2 \
# --output jdk
#
#FROM debian:buster-slim
#
#ARG BUILD_PATH=/opt/build
#ENV JAVA_HOME=/opt/jdk
#ENV PATH "${JAVA_HOME}/bin:${PATH}"
#
#RUN groupadd --gid 1000 spring-app \
# && useradd --uid 1000 --gid spring-app --shell /bin/bash --create-home spring-app
#
#USER spring-app:spring-app
#WORKDIR /opt/workspace
#
#COPY --from=app-build $BUILD_PATH/jdk $JAVA_HOME
#COPY --from=app-build $BUILD_PATH/spring-boot-loader/ ./
#COPY --from=app-build $BUILD_PATH/dependencies/ ./
#COPY --from=app-build $BUILD_PATH/snapshot-dependencies/ ./
#COPY --from=app-build $BUILD_PATH/application/ ./
#
#ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]
##Maven Build
#FROM maven:3.8.3-openjdk-17 AS builder
#COPY pom.xml /app/
#COPY src /app/src
#RUN --mount=type=cache,target=/root/.m2 mvn -f pom.xml clean package -DskipTests
#
##Run
#FROM openjdk:17-jdk-slim
#COPY --from=builder /target/datum-0.0.4.jar app.jar
#EXPOSE 8080
#ENTRYPOINT ["java", "-jar", "app.jar"]