mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
Alex Palaistras
952df3d324
This adds basic configuration for Renovate, and sets up most services for automated updates to package versions.
44 lines
2.3 KiB
Docker
44 lines
2.3 KiB
Docker
FROM docker.io/golang:1.21-bookworm AS podman-exporter-builder
|
|
|
|
RUN apt-get update -y && apt-get upgrade -y && \
|
|
apt-get install -y --no-install-recommends libgpgme-dev libbtrfs-dev libdevmapper-dev libassuan-dev pkg-config
|
|
|
|
# renovate: datasource=github-releases depName=containers/prometheus-podman-exporter
|
|
ARG PODMAN_EXPORTER_VERSION=v1.6.0
|
|
RUN git clone --branch ${PODMAN_EXPORTER_VERSION} --depth 1 https://github.com/containers/prometheus-podman-exporter.git /src && \
|
|
cd /src && make binary
|
|
|
|
FROM docker.io/debian:bookworm-slim
|
|
# renovate: datasource=github-releases depName=prometheus/prometheus
|
|
ARG VERSION=2.48.0
|
|
|
|
RUN apt-get update -y && apt-get upgrade -y && \
|
|
apt-get install -y --no-install-recommends curl ca-certificates libgpgme11 libbtrfs0 \
|
|
libdevmapper1.02.1 libassuan0
|
|
|
|
RUN addgroup --system --gid 10000 prometheus
|
|
RUN adduser --system --uid 10000 --ingroup prometheus --home /var/lib/prometheus prometheus
|
|
|
|
RUN curl --silent --show-error -L https://github.com/prometheus/prometheus/releases/download/v${VERSION}/prometheus-${VERSION}.linux-amd64.tar.gz | \
|
|
tar -C /opt --no-same-owner -xvzf - && \
|
|
mv /opt/prometheus-${VERSION}.linux-amd64 /opt/prometheus && \
|
|
mv /opt/prometheus/promtool /bin/promtool && \
|
|
mv /opt/prometheus/prometheus /bin/prometheus
|
|
|
|
# renovate: datasource=github-releases depName=prometheus/node_exporter
|
|
ARG NODE_EXPORTER_VERSION=1.7.0
|
|
RUN curl --silent --show-error -L https://github.com/prometheus/node_exporter/releases/download/v${NODE_EXPORTER_VERSION}/node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64.tar.gz | \
|
|
tar -C /tmp --no-same-owner -xvzf - node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64/node_exporter && \
|
|
mv /tmp/node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64/node_exporter /bin/node_exporter && \
|
|
rmdir /tmp/node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64
|
|
|
|
COPY --from=podman-exporter-builder /src/bin/prometheus-podman-exporter /bin/podman_exporter
|
|
|
|
COPY container/config /etc/prometheus
|
|
USER prometheus
|
|
|
|
ENTRYPOINT ["/bin/prometheus", "--config.file=/etc/prometheus/prometheus.yml", \
|
|
"--storage.tsdb.path=/var/lib/prometheus", \
|
|
"--web.console.templates=/opt/prometheus/consoles", \
|
|
"--web.console.libraries=/opt/prometheus/console_libraries"]
|