|
| 1 | +FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.25.3-202511260833.g5015a16.el9 AS builder |
| 2 | + |
| 3 | +ENV GOEXPERIMENT=strictfipsruntime |
| 4 | +ENV CGO_ENABLED=1 |
| 5 | +ENV GOOS=linux |
| 6 | +ENV GOFLAGS="-mod=vendor -p=4" |
| 7 | + |
| 8 | +ENV BUILD_VERSION=3.6.5 |
| 9 | + |
| 10 | +ARG SOURCE_GIT_COMMIT |
| 11 | +ENV LOKI_VPREFIX="github.com/grafana/loki/v3/pkg/util/build" |
| 12 | + |
| 13 | +COPY . /opt/app-root/src/loki |
| 14 | +WORKDIR /opt/app-root/src/loki |
| 15 | + |
| 16 | +RUN touch loki-build-image/.uptodate && mkdir -p /build |
| 17 | +RUN go build -ldflags "-s -w -X ${LOKI_VPREFIX}.Branch=upstream-v${BUILD_VERSION} -X ${LOKI_VPREFIX}.Version=v${BUILD_VERSION} -X ${LOKI_VPREFIX}.Revision=${SOURCE_GIT_COMMIT} -X ${LOKI_VPREFIX}.BuildDate=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" -tags strictfipsruntime -o cmd/loki/loki ./cmd/loki/ |
| 18 | + |
| 19 | +FROM registry.redhat.io/ubi9/ubi-minimal:9.7 |
| 20 | + |
| 21 | +COPY --from=builder /opt/app-root/src/loki/cmd/loki/loki /usr/bin/loki |
| 22 | +COPY --from=builder /opt/app-root/src/loki/cmd/loki/loki-local-config.yaml /etc/loki/local-config.yaml |
| 23 | + |
| 24 | +ENTRYPOINT ["/usr/bin/loki"] |
| 25 | + |
| 26 | +LABEL com.redhat.component="logging-loki-container" \ |
| 27 | + description="Horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus." \ |
| 28 | + distribution-scope="subscription" \ |
| 29 | + io.k8s.description="Horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus." \ |
| 30 | + io.k8s.display-name="OpenShift Loki" \ |
| 31 | + io.openshift.maintainer.component="Logging" \ |
| 32 | + io.openshift.maintainer.product="OpenShift Container Platform" \ |
| 33 | + io.openshift.tags="openshift,logging,loki" \ |
| 34 | + maintainer="AOS Logging <team-logging@redhat.com>" \ |
| 35 | + name="openshift-logging/logging-loki-rhel9" \ |
| 36 | + summary="Horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus." \ |
| 37 | + url="https://catalog.redhat.com/en/software/containers/openshift-logging/logging-loki-rhel9/64479926a759a6e51ef79b12" \ |
| 38 | + vendor="Red Hat, Inc." \ |
| 39 | + version_minor="v3.6" \ |
| 40 | + version=v3.6.5 |
0 commit comments