-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.jaegerquery
57 lines (45 loc) · 2.5 KB
/
Dockerfile.jaegerquery
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM registry.redhat.io/ubi9/nodejs-22:latest@sha256:921998a13af392c919d84121756dd2dc7490d2a6bad13103e32b1eca39c5e663 as builder-ui
WORKDIR /opt/app-root/src
USER root
COPY jaeger-ui jaeger-ui
# this directory is checked by ecosystem-cert-preflight-checks task in Konflux
COPY jaeger-ui/LICENSE /licenses/
WORKDIR /opt/app-root/src/jaeger-ui
RUN npm ci --ignore-scripts
RUN npm run build
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.22@sha256:99a63fb1eab333048e7f029dfacfe1054fc08b123b093e66a91ded52a908f781 as builder
WORKDIR /opt/app-root/src
USER root
COPY .git .git
COPY jaeger jaeger
# this directory is checked by ecosystem-cert-preflight-checks task in Konflux
COPY jaeger/LICENSE /licenses/
WORKDIR /opt/app-root/src/jaeger
COPY --from=builder-ui /opt/app-root/src/jaeger-ui /opt/app-root/src/jaeger-ui
RUN rm -rf ./cmd/query/app/ui/actual && mkdir ./cmd/query/app/ui/actual && cp -r /opt/app-root/src/jaeger-ui/packages/jaeger-ui/build/* ./cmd/query/app/ui/actual/ && find ./cmd/query/app/ui/actual -type f | xargs gzip && \
exportOrFail() { echo $1; if [[ $1 == *= ]]; then echo "Error: empty variable assignment"; exit 1; else export "$1"; fi } && \
exportOrFail VERSION_PKG="github.com/jaegertracing/jaeger/pkg/version" && \
exportOrFail VERSION_DATE=`date -u +'%Y-%m-%dT%H:%M:%SZ'` && \
exportOrFail GIT_LATEST_TAG=`git describe --abbrev=0 --tags --always` && \
exportOrFail GIT_COMMIT_SHA=`git rev-parse HEAD` && \
CGO_ENABLED=1 GOEXPERIMENT=strictfipsruntime go build -C ./cmd/query -mod=mod -tags strictfipsruntime,ui \
-o ./jaeger -trimpath -ldflags "-s -w" \
-ldflags "-X ${VERSION_PKG}.commitSHA=${GIT_COMMIT_SHA} \
-X ${VERSION_PKG}.latestVersion=${GIT_LATEST_TAG} \
-X ${VERSION_PKG}.date=${VERSION_DATE}"
FROM registry.redhat.io/ubi8/ubi-minimal:latest@sha256:c12e67af6a7e15113d76bc72f10bef2045c026c71ec8b7124c8a075458188a83
WORKDIR /
RUN mkdir /licenses
COPY jaeger/LICENSE /licenses/.
COPY --from=builder /opt/app-root/src/jaeger/cmd/query/jaeger /usr/bin/jaeger
ARG USER_UID=1001
USER ${USER_UID}
ENTRYPOINT ["/usr/bin/jaeger"]
LABEL com.redhat.component="jaeger-query-container" \
name="rhosdt/jaeger-query-rhel8" \
summary="Jaeger Query" \
description="This container provides Jaeger UI for Tempo" \
io.k8s.description="This container provides Jaeger UI for Tempo." \
io.openshift.expose-services="16686:uihttp" \
io.openshift.tags="tracing" \
io.k8s.display-name="Jaeger Query"