48 lines
2.4 KiB
Docker
48 lines
2.4 KiB
Docker
FROM docker.io/bitnami/minideb:bullseye
|
|
|
|
ARG TARGETARCH
|
|
|
|
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
|
|
org.opencontainers.image.description="Application packaged by Bitnami" \
|
|
org.opencontainers.image.ref.name="2.38.0-debian-11-r14" \
|
|
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/prometheus" \
|
|
org.opencontainers.image.title="prometheus" \
|
|
org.opencontainers.image.vendor="VMware, Inc." \
|
|
org.opencontainers.image.version="2.38.0"
|
|
|
|
ENV HOME="/" \
|
|
OS_ARCH="${TARGETARCH:-amd64}" \
|
|
OS_FLAVOUR="debian-11" \
|
|
OS_NAME="linux"
|
|
|
|
COPY prebuildfs /
|
|
SHELL ["/bin/bash", "-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/ && \
|
|
if [ ! -f prometheus-2.38.0-1-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/prometheus-2.38.0-1-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/prometheus-2.38.0-1-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
|
|
fi && \
|
|
sha256sum -c prometheus-2.38.0-1-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
|
|
tar -zxf prometheus-2.38.0-1-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf prometheus-2.38.0-1-linux-${OS_ARCH}-debian-11.tar.gz prometheus-2.38.0-1-linux-${OS_ARCH}-debian-11.tar.gz.sha256
|
|
RUN 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 ln -sf /opt/bitnami/prometheus/conf /etc/prometheus
|
|
RUN ln -sf /opt/bitnami/prometheus/data /prometheus
|
|
RUN chown -R 1001:1001 /opt/bitnami/prometheus
|
|
|
|
RUN mkdir -p /opt/bitnami/prometheus/data/ && chmod g+rwX /opt/bitnami/prometheus/data/
|
|
ENV APP_VERSION="2.38.0" \
|
|
BITNAMI_APP_NAME="prometheus" \
|
|
PATH="/opt/bitnami/prometheus/bin:$PATH"
|
|
|
|
EXPOSE 9090
|
|
|
|
WORKDIR /opt/bitnami/prometheus
|
|
USER 1001
|
|
ENTRYPOINT [ "/opt/bitnami/prometheus/bin/prometheus" ]
|
|
CMD [ "--config.file=/opt/bitnami/prometheus/conf/prometheus.yml", "--storage.tsdb.path=/opt/bitnami/prometheus/data", "--web.console.libraries=/opt/bitnami/prometheus/conf/console_libraries", "--web.console.templates=/opt/bitnami/prometheus/conf/consoles" ]
|