All checks were successful
Build Container (Nix) / detect (push) Successful in 2s
Build Container / detect (push) Successful in 2s
Build Container (Nix) / build (alloy) (push) Successful in 9s
Build Container (Nix) / build (cv) (push) Successful in 2s
Build Container (Nix) / build (devpi) (push) Successful in 2s
Build Container (Nix) / build (grafana) (push) Successful in 2s
Build Container / build (cv) (push) Successful in 20s
Build Container (Nix) / build (grafana-sidecar) (push) Successful in 2s
Build Container (Nix) / build (homepage) (push) Successful in 2s
Build Container (Nix) / build (kiwix-serve) (push) Successful in 2s
Build Container (Nix) / build (kubectl) (push) Successful in 3s
Build Container (Nix) / build (loki) (push) Successful in 2s
Build Container / build (alloy) (push) Successful in 40s
Build Container (Nix) / build (mealie) (push) Successful in 1s
Build Container (Nix) / build (miniflux) (push) Successful in 2s
Build Container (Nix) / build (navidrome) (push) Successful in 2s
Build Container / build (devpi) (push) Successful in 41s
Build Container (Nix) / build (nettest) (push) Successful in 15s
Build Container / build (grafana-sidecar) (push) Successful in 1m27s
Build Container / build (grafana) (push) Successful in 3m23s
Build Container (Nix) / build (ntfy) (push) Successful in 3m19s
Build Container (Nix) / build (prometheus) (push) Successful in 1s
Build Container (Nix) / build (quartz) (push) Successful in 1s
Build Container (Nix) / build (runner-job-image) (push) Successful in 1s
Build Container (Nix) / build (teslamate) (push) Successful in 2s
Build Container (Nix) / build (transmission) (push) Successful in 2s
Build Container (Nix) / build (transmission-exporter) (push) Successful in 1s
Build Container (Nix) / build (unpoller) (push) Successful in 1s
Build Container / build (kiwix-serve) (push) Successful in 1m17s
Build Container / build (kubectl) (push) Successful in 41s
Build Container / build (homepage) (push) Successful in 8m21s
Build Container / build (mealie) (push) Successful in 1m1s
Build Container / build (loki) (push) Successful in 8m21s
Build Container / build (miniflux) (push) Successful in 2m24s
Build Container / build (nettest) (push) Successful in 14s
Build Container / build (ntfy) (push) Successful in 8m33s
Build Container / build (prometheus) (push) Successful in 37s
Build Container / build (quartz) (push) Successful in 19s
Build Container / build (navidrome) (push) Successful in 10m36s
Build Container / build (runner-job-image) (push) Successful in 3m18s
Build Container / build (transmission) (push) Successful in 20s
Build Container / build (transmission-exporter) (push) Successful in 21s
Build Container / build (unpoller) (push) Successful in 11s
Build Container / build (teslamate) (push) Successful in 4m42s
Every container now carries title, description, version, source, and vendor labels per the OCI image spec. Version is derived from the existing CONTAINER_APP_VERSION ARG at build time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
79 lines
2.5 KiB
Docker
79 lines
2.5 KiB
Docker
# Prometheus monitoring system
|
|
# Three-stage build: Web UI (Node), binaries (Go), runtime (Alpine)
|
|
|
|
ARG CONTAINER_APP_VERSION=v3.10.0
|
|
ARG PROMETHEUS_VERSION=${CONTAINER_APP_VERSION}
|
|
|
|
FROM node:22-alpine AS ui-build
|
|
|
|
ARG PROMETHEUS_VERSION
|
|
RUN apk add --no-cache git bash
|
|
|
|
RUN git clone --depth 1 --branch ${PROMETHEUS_VERSION} \
|
|
https://forge.ops.eblu.me/mirrors/prometheus.git /app
|
|
|
|
WORKDIR /app/web/ui
|
|
|
|
# Install workspace dependencies (mantine-ui, modules)
|
|
RUN npm ci
|
|
|
|
# Install legacy React app dependencies (separated from workspaces upstream)
|
|
RUN cd react-app && npm ci
|
|
|
|
# Build all UI components: modules, react-app, mantine-ui → static/
|
|
RUN npm run build
|
|
|
|
FROM golang:alpine3.22 AS build
|
|
|
|
ARG PROMETHEUS_VERSION
|
|
RUN apk add --no-cache build-base git bash
|
|
|
|
RUN git clone --depth 1 --branch ${PROMETHEUS_VERSION} \
|
|
https://forge.ops.eblu.me/mirrors/prometheus.git /app
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy pre-built UI assets
|
|
COPY --from=ui-build /app/web/ui/static /app/web/ui/static
|
|
|
|
# Generate embed.go with //go:embed directives for gzipped assets
|
|
RUN scripts/compress_assets.sh
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
RUN go build -tags netgo,builtinassets \
|
|
-ldflags="-w -s -X github.com/prometheus/common/version.Version=${PROMETHEUS_VERSION} \
|
|
-X github.com/prometheus/common/version.Branch=HEAD \
|
|
-X github.com/prometheus/common/version.BuildUser=blumeops \
|
|
-X github.com/prometheus/common/version.Revision=blumeops-build" \
|
|
-o /bin/prometheus ./cmd/prometheus
|
|
|
|
RUN go build -tags netgo,builtinassets \
|
|
-ldflags="-w -s -X github.com/prometheus/common/version.Version=${PROMETHEUS_VERSION}" \
|
|
-o /bin/promtool ./cmd/promtool
|
|
|
|
FROM alpine:3.22
|
|
|
|
ARG CONTAINER_APP_VERSION
|
|
LABEL org.opencontainers.image.title="Prometheus"
|
|
LABEL org.opencontainers.image.description="Prometheus monitoring system and time series database"
|
|
LABEL org.opencontainers.image.version="${CONTAINER_APP_VERSION}"
|
|
LABEL org.opencontainers.image.source="https://forge.eblu.me/eblume/blumeops"
|
|
LABEL org.opencontainers.image.vendor="blumeops"
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
|
|
RUN mkdir -p /prometheus /etc/prometheus \
|
|
&& chown -R 65534:65534 /prometheus /etc/prometheus
|
|
|
|
COPY --from=build /bin/prometheus /usr/bin/prometheus
|
|
COPY --from=build /bin/promtool /usr/bin/promtool
|
|
COPY --from=build /app/documentation/examples/prometheus.yml /etc/prometheus/prometheus.yml
|
|
|
|
EXPOSE 9090
|
|
VOLUME ["/prometheus"]
|
|
|
|
USER 65534
|
|
ENTRYPOINT ["/usr/bin/prometheus"]
|
|
CMD ["--config.file=/etc/prometheus/prometheus.yml", \
|
|
"--storage.tsdb.path=/prometheus"]
|