forked from Azure/ARO-RP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.telemetryexporter
More file actions
32 lines (28 loc) · 957 Bytes
/
Copy pathDockerfile.telemetryexporter
File metadata and controls
32 lines (28 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Uses a multi-stage container build to build the custom OpenTelemetry Collector for the in-cluster telemetry exporter.
#
ARG REGISTRY
ARG BUILDER_REGISTRY
ARG BUILDER_REPOSITORY=openshift-release-dev/golang-builder--partner-share
ARG BUILDER_TAG=rhel-9-golang-1.25-openshift-4.21
ARG REPOSITORY=ubi9/ubi-minimal
ARG TAG=latest
ARG VERSION
FROM ${BUILDER_REGISTRY}/${BUILDER_REPOSITORY}:${BUILDER_TAG} AS builder
ENV GO_COMPLIANCE_INFO=0
ENV GOWORK=off
USER root
ENV GOPATH=/root/go
ENV PATH=$PATH:${GOPATH}/bin/
RUN mkdir -p /app
WORKDIR /app
COPY . /app
RUN make build-telemetryexporter VERSION=${VERSION} && make validate-fips-telemetryexporter
FROM ${REGISTRY}/${REPOSITORY}:${TAG}
USER root
RUN microdnf install -y systemd && \
microdnf clean all && \
rm -rf /var/cache/dnf /var/cache/yum
COPY --from=builder /app/telemetry/exporter/build/collector/telemetryexporter /usr/local/bin/
ENTRYPOINT ["telemetryexporter"]
USER 1000
ENV HOME=/tmp