-
Notifications
You must be signed in to change notification settings - Fork 2
/
Containerfile.cert-manager.acmesolver
51 lines (41 loc) · 2.37 KB
/
Containerfile.cert-manager.acmesolver
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
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/jetstack-cert-manager"
COPY cert-manager $SOURCE_DIR
COPY cert-manager/LICENSE /licenses/
ENV GO_BUILD_TAGS=strictfipsruntime,openssl
ENV GOEXPERIMENT=strictfipsruntime
ENV CGO_ENABLED=1
ENV GOFLAGS=""
RUN cd $SOURCE_DIR/cmd/acmesolver && go build -o $SOURCE_DIR/_output/acmesolver -ldflags '-w -s' -tags ${GO_BUILD_TAGS} main.go
RUN cd $SOURCE_DIR/cmd/cainjector && go build -o $SOURCE_DIR/_output/cainjector -ldflags '-w -s' -tags ${GO_BUILD_TAGS} main.go
RUN cd $SOURCE_DIR/cmd/controller && go build -o $SOURCE_DIR/_output/controller -ldflags '-w -s' -tags ${GO_BUILD_TAGS} main.go
RUN cd $SOURCE_DIR/cmd/webhook && go build -o $SOURCE_DIR/_output/webhook -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/jetstack-cert-manager"
COPY --from=builder $SOURCE_DIR/_output/acmesolver /app/cmd/acmesolver/acmesolver
COPY --from=builder $SOURCE_DIR/_output/cainjector /app/cmd/cainjector/cainjector
COPY --from=builder $SOURCE_DIR/_output/controller /app/cmd/controller/controller
COPY --from=builder $SOURCE_DIR/_output/webhook /app/cmd/webhook/webhook
COPY --from=builder /licenses /licenses
USER 65534:65534
LABEL com.redhat.component="jetstack-cert-manager-acmesolver-container" \
name="cert-manager/jetstack-cert-manager-acmesolver-rhel9" \
version="${RELEASE_VERSION}" \
summary="cert-manager-acmesolver" \
maintainer="Red Hat, Inc." \
description="jetstack-cert-manager-acmesolver-container" \
io.openshift.expose-services="" \
io.openshift.tags="data,images,cert-manager-acmesolver" \
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-acmesolver" \
io.k8s.description="jetstack-cert-manager-acmesolver-container"
ENTRYPOINT ["/app/cmd/acmesolver/acmesolver"]