Skip to content

Commit b7d8569

Browse files
authored
Merge pull request #5 from utilitywarehouse/update-jar-location
Put jar in /opt/lib as /lib has contents already in the alpine image
2 parents 7dc65e2 + c729969 commit b7d8569

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ RUN --mount=type=cache,target=/var/cache/apk \
66
ENV VERSION=1.4.0
77
ENV JAR=jmx_prometheus_javaagent-$VERSION.jar
88

9-
RUN curl -L https://github.com/prometheus/jmx_exporter/releases/download/$VERSION/$JAR -o /lib/$JAR
9+
RUN mkdir -p /opt/lib
10+
RUN curl -L https://github.com/prometheus/jmx_exporter/releases/download/$VERSION/$JAR -o /opt/lib/$JAR
1011

1112
FROM alpine:3.22
12-
COPY --from=tmp /lib /lib
13+
COPY --from=tmp /opt/lib /opt/lib

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Docker image that contains the JMX Prometheus javaagent library
33

44
This should be used as a K8s init container for copying the library in other containers
55

6-
The jar file is available at `/lib/jmx_prometheus_javaagent-$VERSION.jar.`
6+
The jar file is available at `/opt/lib/jmx_prometheus_javaagent-$VERSION.jar.`

0 commit comments

Comments
 (0)