-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathContainerfile.cert-manager-istio-csr
43 lines (34 loc) · 1.71 KB
/
Containerfile.cert-manager-istio-csr
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
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.22 AS builder
ARG SOURCE_DIR="/go/src/github.com/openshift/cert-manager-istio-csr"
COPY cert-manager-istio-csr $SOURCE_DIR
COPY cert-manager-istio-csr/LICENSE /licenses/
ENV GO_BUILD_TAGS=strictfipsruntime,openssl
ENV GOEXPERIMENT=strictfipsruntime
ENV CGO_ENABLED=1
ENV GOFLAGS=""
RUN cd $SOURCE_DIR/cmd && go build -o $SOURCE_DIR/_output/cert-manager-istio-csr -ldflags '-w -s' -tags ${GO_BUILD_TAGS} main.go
FROM registry.redhat.io/rhel9-4-els/rhel:9.4
# Values for below ARGs will passed from tekton configs for konflux builds.
## Release version of the cert-manager source code used in the build.
ARG RELEASE_VERSION
## Commit hash that considered for the image build.
ARG COMMIT_SHA
## github URL of the cert-manager source repository.
ARG SOURCE_URL
ARG SOURCE_DIR="/go/src/github.com/openshift/cert-manager-istio-csr"
COPY --from=builder $SOURCE_DIR/_output/cert-manager-istio-csr /usr/local/bin/cert-manager-istio-csr
COPY --from=builder /licenses /licenses
USER 65534:65534
LABEL com.redhat.component="cert-manager-istio-csr-container" \
name="cert-manager/istio-csr-rhel9" \
version="${RELEASE_VERSION}" \
summary="cert-manager-istio-csr" \
maintainer="Red Hat, Inc." \
description="cert-manager-istio-csr-container" \
io.openshift.expose-services="" \
io.openshift.tags="data,images,cert-manager" \
io.openshift.build.commit.id="${COMMIT_SHA}" \
io.openshift.build.source-location="${SOURCE_URL}" \
io.openshift.build.commit.url="${SOURCE_URL}/commit/${COMMIT_SHA}" \
io.k8s.display-name="cert-manager-istio-csr-controller" \
io.k8s.description="cert-manager-istio-csr-container"