forked from bharath-b-rh/cert-manager-operator-konflux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile.cert-manager.acmesolver
47 lines (37 loc) · 2.13 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
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-2-els/rhel:9.2-1362
ARG RELEASE_VERSION
ARG COMMIT_SHA
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="v${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"]