-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathContainerfile.obs-api
More file actions
34 lines (23 loc) · 1.08 KB
/
Containerfile.obs-api
File metadata and controls
34 lines (23 loc) · 1.08 KB
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
33
34
# Copyright Contributors to the Open Cluster Management project
# Licensed under the Apache License 2.0
FROM quay.io/redhat-services-prod/openshift/boilerplate:image-v8.0.0 AS builder
RUN dnf -y update --allowerasing && dnf clean all
ADD api /opt
WORKDIR /opt
ARG VERSION
ENV LDFLAGS="-s -w -X main.Version=${VERSION} -X main.Branch=main -X main.Revision=${VERSION}"
RUN go build -a -ldflags "$LDFLAGS" -o observatorium-api .
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest AS runner
COPY --from=builder /opt/observatorium-api /bin/observatorium-api
COPY --from=builder /opt/LICENSE /licenses/LICENSE
ARG VERSION
USER 10000:10000
LABEL vendor="Red Hat, Inc." \
com.redhat.component="rhobs-observatorium-api" \
name="observatorium-api" \
maintainer="team-monitoring@redhat.com" \
version="$VERSION" \
release="$VERSION" \
description="The Observatorium API provides an authenticated and authorized, multi-tenant interface for writing and reading observability signals, including logs and metrics." \
summary="The Observatorium API"
ENTRYPOINT ["/bin/observatorium-api"]