-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.tempoquery
42 lines (34 loc) · 1.84 KB
/
Dockerfile.tempoquery
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
35
36
37
38
39
40
41
42
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.22@sha256:414352c89e06f25f79b4927328504edcdbfe676cd9596b44afff2eb4117c17e0 as builder
WORKDIR /opt/app-root/src
USER root
COPY .git .git
COPY tempo tempo
# this directory is checked by ecosystem-cert-preflight-checks task in Konflux
COPY tempo/LICENSE /licenses/
WORKDIR /opt/app-root/src/tempo
RUN exportOrFail() { echo $1; if [[ $1 == *= ]]; then echo "Error: empty variable assignment"; exit 1; else export "$1"; fi } && \
exportOrFail GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` && \
exportOrFail GIT_REVISION=`git rev-parse --short HEAD` && \
exportOrFail VERSION=`./tools/image-tag | cut -d, -f 1` && \
CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go build -C ./cmd/tempo-query -tags strictfipsruntime -mod vendor \
-ldflags "-X main.Branch=${GIT_BRANCH} -X main.Revision=${GIT_REVISION} -X main.Version=${VERSION}" \
-o "tempo-query" -trimpath -ldflags "-s -w"
FROM registry.redhat.io/ubi8/ubi-minimal:latest@sha256:c12e67af6a7e15113d76bc72f10bef2045c026c71ec8b7124c8a075458188a83
WORKDIR /
RUN microdnf update -y && rm -rf /var/cache/yum && \
microdnf install openssl -y && \
microdnf clean all
RUN mkdir /licenses
COPY tempo/LICENSE /licenses/.
COPY --from=builder /opt/app-root/src/tempo/cmd/tempo-query/tempo-query /usr/bin/tempo-query
ARG USER_UID=1001
USER ${USER_UID}
ENTRYPOINT ["/usr/bin/tempo-query"]
LABEL com.redhat.component="tempo-query-container" \
name="rhosdt/tempo-query-rhel8" \
summary="Tempo Query" \
description="This container exposes a Jaeger Query compatible API from Tempo" \
io.k8s.description="This container exposes a Jaeger Query compatible API from Tempo." \
io.openshift.expose-services="16686:http,16687:metrics" \
io.openshift.tags="tracing" \
io.k8s.display-name="Tempo Query"