77FROM stackable/image/java-devel AS builder
88
99ARG PRODUCT
10- ARG JMX_EXPORTER
1110ARG STACKABLE_USER_UID
1211
1312# Copy patches into the builder
1413COPY --chown=${STACKABLE_USER_UID}:0 zookeeper/stackable/patches/patchable.toml /stackable/src/zookeeper/stackable/patches/patchable.toml
1514COPY --chown=${STACKABLE_USER_UID}:0 zookeeper/stackable/patches/${PRODUCT} /stackable/src/zookeeper/stackable/patches/${PRODUCT}
16- # Copy JMX config into the builder
17- COPY --chown=${STACKABLE_USER_UID}:0 zookeeper/stackable/jmx /stackable/jmx
1815
1916USER ${STACKABLE_USER_UID}
2017WORKDIR /stackable
@@ -38,12 +35,6 @@ mv zookeeper-assembly/target/bom.json /stackable/apache-zookeeper-${PRODUCT}-bin
3835rm -rf /stackable/apache-zookeeper-${PRODUCT}-bin/docs
3936rm /stackable/apache-zookeeper-${PRODUCT}-bin/README_packaging.md
4037
41- # Download the JMX exporter jar from our own repo
42- curl "https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar" \
43- -o "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar"
44- chmod +x "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar"
45- ln -s "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar" /stackable/jmx/jmx_prometheus_javaagent.jar
46-
4738# set correct groups
4839chmod -R g=u /stackable
4940EOF
@@ -72,7 +63,6 @@ LABEL \
7263# Copy over the ZooKeeper binary folder
7364COPY --chown=${STACKABLE_USER_UID}:0 --from=builder /stackable/apache-zookeeper-${PRODUCT}-bin /stackable/apache-zookeeper-${PRODUCT}-bin/
7465COPY --chown=${STACKABLE_USER_UID}:0 --from=builder /stackable/zookeeper-${PRODUCT}-src.tar.gz /stackable
75- COPY --chown=${STACKABLE_USER_UID}:0 --from=builder /stackable/jmx /stackable/jmx/
7666COPY zookeeper/licenses /licenses
7767
7868RUN <<EOF
@@ -89,7 +79,6 @@ ln -s /stackable/apache-zookeeper-${PRODUCT}-bin/ /stackable/zookeeper
8979chown -h ${STACKABLE_USER_UID}:0 /stackable/zookeeper
9080
9181# fix missing permissions
92- chmod g=u /stackable/jmx
9382chmod g=u /stackable/apache-zookeeper-${PRODUCT}-bin/
9483EOF
9584
0 commit comments