forked from cisco-open/test-telemetry-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 914 Bytes
/
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
FROM openjdk:17-oraclelinux8 as builder
USER root
RUN jlink \
--module-path "$JAVA_HOME/jmods" \
--add-modules java.compiler,java.sql,java.naming,java.management,java.instrument,java.rmi,java.desktop,jdk.internal.vm.compiler.management,java.xml.crypto,java.scripting,java.security.jgss,jdk.httpserver,java.net.http,jdk.naming.dns,jdk.crypto.cryptoki,jdk.unsupported \
--verbose \
--strip-debug \
--compress 2 \
--no-header-files \
--no-man-pages \
--output /opt/jre-minimal
USER app
#
## Now it is time for us to build our real image on top of an slim version of debian
#
FROM bitnami/minideb:bullseye
COPY --from=builder /opt/jre-minimal /opt/jre-minimal
ENV JAVA_HOME=/opt/jre-minimal
ENV PATH="$PATH:$JAVA_HOME/bin"
WORKDIR /
COPY build/libs/test-telemetry-generator-all.jar /
COPY tools/start.sh /
RUN chmod +x start.sh test-telemetry-generator-all.jar
CMD ["./start.sh"]