-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dudi Dolev
committed
Jan 22, 2025
1 parent
2be9563
commit 04823da
Showing
2 changed files
with
87 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,84 @@ | ||
FROM alpine AS builder | ||
RUN apk add --no-cache ca-certificates | ||
# #FROM alpine AS builder | ||
# FROM docker.io/bitnami/minideb:bookworm | ||
# #RUN apk add --no-cache ca-certificates | ||
# RUN install_packages ca-certificates curl procps | ||
|
||
# RUN apt-get autoremove --purge -y curl && \ | ||
# apt-get update && apt-get upgrade -y && \ | ||
# apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives | ||
|
||
# #FROM scratch AS final | ||
# USER 1001:1001 | ||
# #COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
# COPY ./mongodb_exporter /bin/mongodb_exporter | ||
# #RUN chmod g+rwX /bin/mongodb_exporter | ||
# RUN chmod 777 /bin/mongodb_exporter | ||
|
||
# EXPOSE 9216 | ||
# ENTRYPOINT ["/mongodb_exporter"] | ||
|
||
|
||
|
||
# Copyright Broadcom, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: APACHE-2.0 | ||
|
||
FROM docker.io/bitnami/minideb:bookworm | ||
|
||
ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith" | ||
ARG TARGETARCH | ||
|
||
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ | ||
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ | ||
org.opencontainers.image.created="2025-01-17T03:23:22Z" \ | ||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ | ||
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/mongodb-exporter/README.md" \ | ||
org.opencontainers.image.licenses="Apache-2.0" \ | ||
org.opencontainers.image.ref.name="0.43.1-debian-12-r2" \ | ||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mongodb-exporter" \ | ||
org.opencontainers.image.title="mongodb-exporter" \ | ||
org.opencontainers.image.vendor="Broadcom, Inc." \ | ||
org.opencontainers.image.version="0.43.1" | ||
|
||
ENV HOME="/" \ | ||
OS_ARCH="${TARGETARCH:-amd64}" \ | ||
OS_FLAVOUR="debian-12" \ | ||
OS_NAME="linux" | ||
|
||
# COPY prebuildfs / | ||
# SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] | ||
# Install required system packages and dependencies | ||
RUN install_packages ca-certificates curl procps | ||
# RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ | ||
# COMPONENTS=( \ | ||
# "mongodb-exporter-0.43.1-1-linux-${OS_ARCH}-debian-12" \ | ||
# ) ; \ | ||
# for COMPONENT in "${COMPONENTS[@]}"; do \ | ||
# if [ ! -f "${COMPONENT}.tar.gz" ]; then \ | ||
# curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \ | ||
# curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \ | ||
# fi ; \ | ||
# sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \ | ||
# tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \ | ||
# rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \ | ||
# done | ||
|
||
RUN mkdir -p /opt/bitnami/mongodb-exporter/bin | ||
|
||
COPY ./mongodb_exporter /opt/bitnami/mongodb-exporter/bin/mongodb_exporter | ||
|
||
RUN apt-get autoremove --purge -y curl && \ | ||
apt-get update && apt-get upgrade -y && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives | ||
RUN chmod g+rwX /opt/bitnami | ||
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true | ||
RUN ln -sf /opt/bitnami/mongodb-exporter/bin/mongodb_exporter /bin/mongodb_exporter | ||
|
||
ENV APP_VERSION="0.43.1" \ | ||
BITNAMI_APP_NAME="mongodb-exporter" \ | ||
PATH="/opt/bitnami/mongodb-exporter/bin:$PATH" | ||
|
||
FROM scratch AS final | ||
USER 65535:65535 | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY ./mongodb_exporter / | ||
EXPOSE 9216 | ||
ENTRYPOINT ["/mongodb_exporter"] | ||
|
||
WORKDIR /opt/bitnami/mongodb-exporter | ||
USER 1001 | ||
ENTRYPOINT [ "mongodb_exporter" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters