From e800f667ebb7c71e4545ce4f1fded5447fd9314f Mon Sep 17 00:00:00 2001 From: Jesus Samitier Date: Mon, 6 Nov 2023 11:00:59 +0100 Subject: [PATCH] restore scratch target --- build/Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build/Dockerfile b/build/Dockerfile index 3d6846f7..aca65046 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -4,6 +4,19 @@ WORKDIR /opt/jmx_exporter COPY . . RUN mvn package -DskipTests +FROM anapsix/alpine-java:9 as scratch + +RUN apk update && apk upgrade && apk --update add curl && rm -rf /tmp/* /var/cache/apk/* + +ENV VERSION 0.20.1 +ENV JAR jmx_prometheus_httpserver-$VERSION.jar +COPY --from=javabuilder /opt/jmx_exporter/jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-$VERSION-SNAPSHOT.jar /opt/jmx_exporter/$JAR +COPY build/start.sh /opt/jmx_exporter +COPY build/config.yml /opt/jmx_exporter +RUN chmod +x /opt/jmx_exporter/start.sh + +CMD ["/opt/jmx_exporter/start.sh"] + FROM quay.io/sysdig/sysdig-mini-ubi:1.5.8 as ubi RUN microdnf --assumeyes --disableplugin=subscription-manager --nodocs update && \