1- # #FROM alpine AS builder
2- # FROM docker.io/bitnami/minideb:bookworm
3- # #RUN apk add --no-cache ca-certificates
4- # RUN install_packages ca-certificates curl procps
5-
6- # RUN apt-get autoremove --purge -y curl && \
7- # apt-get update && apt-get upgrade -y && \
8- # apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
9-
10- # #FROM scratch AS final
11- # USER 1001:1001
12- # #COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
13- # COPY ./mongodb_exporter /bin/mongodb_exporter
14- # #RUN chmod g+rwX /bin/mongodb_exporter
15- # RUN chmod 777 /bin/mongodb_exporter
16-
17- # EXPOSE 9216
18- # ENTRYPOINT ["/mongodb_exporter"]
19-
20-
21-
22- # Copyright Broadcom, Inc. All Rights Reserved.
23- # SPDX-License-Identifier: APACHE-2.0
24-
25- FROM docker.io/bitnami/minideb:bookworm
26-
27- ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
28- ARG TARGETARCH
29-
30- LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
31- org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
32- org.opencontainers.image.created="2025-01-17T03:23:22Z" \
33- org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
34- org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/mongodb-exporter/README.md" \
35- org.opencontainers.image.licenses="Apache-2.0" \
36- org.opencontainers.image.ref.name="0.43.1-debian-12-r2" \
37- org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mongodb-exporter" \
38- org.opencontainers.image.title="mongodb-exporter" \
39- org.opencontainers.image.vendor="Broadcom, Inc." \
40- org.opencontainers.image.version="0.43.1"
41-
42- ENV HOME="/" \
43- OS_ARCH="${TARGETARCH:-amd64}" \
44- OS_FLAVOUR="debian-12" \
45- OS_NAME="linux"
46-
47- # COPY prebuildfs /
48- # SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
49- # Install required system packages and dependencies
50- RUN install_packages ca-certificates curl procps
51- # RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
52- # COMPONENTS=( \
53- # "mongodb-exporter-0.43.1-1-linux-${OS_ARCH}-debian-12" \
54- # ) ; \
55- # for COMPONENT in "${COMPONENTS[@]}"; do \
56- # if [ ! -f "${COMPONENT}.tar.gz" ]; then \
57- # curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
58- # curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
59- # fi ; \
60- # sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
61- # tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \
62- # rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
63- # done
64-
65- RUN mkdir -p /opt/bitnami/mongodb-exporter/bin
66-
67- COPY ./mongodb_exporter /opt/bitnami/mongodb-exporter/bin/mongodb_exporter
68-
69- RUN apt-get autoremove --purge -y curl && \
70- apt-get update && apt-get upgrade -y && \
71- apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
72- RUN chmod g+rwX /opt/bitnami
73- RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
74- RUN ln -sf /opt/bitnami/mongodb-exporter/bin/mongodb_exporter /bin/mongodb_exporter
75-
76- ENV APP_VERSION="0.43.1" \
77- BITNAMI_APP_NAME="mongodb-exporter" \
78- PATH="/opt/bitnami/mongodb-exporter/bin:$PATH"
1+ FROM alpine AS builder
2+ RUN apk add --no-cache ca-certificates
793
4+ FROM scratch AS final
5+ USER 65535:65535
6+ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
7+ COPY ./mongodb_exporter /
808EXPOSE 9216
81-
82- WORKDIR /opt/bitnami/mongodb-exporter
83- USER 1001
84- ENTRYPOINT [ "mongodb_exporter" ]
9+ ENTRYPOINT ["/mongodb_exporter" ]
0 commit comments