forked from openshift/oadp-must-gather
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.oadp
More file actions
66 lines (53 loc) · 3.04 KB
/
Copy pathDockerfile.oadp
File metadata and controls
66 lines (53 loc) · 3.04 KB
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
58
59
60
61
62
63
64
65
66
# upstream src https://github.com/openshift/oadp-must-gather/blob/oadp-dev/Dockerfile
# oc
#@follow_tag(registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-cli-rhel9:v4.19)
FROM brew.registry.redhat.io/rh-osbs/openshift-ose-cli-rhel9:v4.19 AS ose-cli
#@follow_tag(registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23)
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 AS builder
COPY . /workspace
USER root
RUN chown -R 1001:0 /workspace
USER 1001
# mustgather
WORKDIR /workspace/
RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=mod -tags strictfipsruntime -o ./gather cmd/main.go
# kopia
WORKDIR /workspace/kopia/
RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=mod -tags strictfipsruntime -o ./kopia
#######################################################################
#######################################################################
# #
# W W AA RRRR N N III N N GGG #
# W W A A R R NN N I NN N G #
# W W W AAAA RRRR N N N I N N N G GG #
# W W W A A R R N NN I N NN G G #
# W W A A R RR N N III N N GGG #
# #
# Any changes to the `velero` and `restic` sections below must also #
# be reconciled in oadp-velero/Dockerfile.in for consistency. #
#######################################################################
# BEGIN #
#######################################################################
# velero
WORKDIR /workspace/velero/
ENV GOEXPERIMENT strictfipsruntime
RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=mod -ldflags '-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v1.16.1-OADP' -tags strictfipsruntime -o ./bin/velero ./cmd/velero
# restic
WORKDIR /workspace/restic/
ENV GOEXPERIMENT strictfipsruntime
RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=mod -tags strictfipsruntime -o ./bin/restic ./cmd/restic
#######################################################################
# END #
#######################################################################
ENV INSTALLATION_NAMESPACE openshift-adp
#@follow_tag(registry.redhat.io/ubi9/ubi-minimal:latest)
FROM registry.redhat.io/ubi9/ubi-minimal:latest
RUN microdnf -y install openssl rsync tar gzip && microdnf -y reinstall tzdata && microdnf -y clean all
COPY --from=builder /workspace/velero/bin/velero /usr/bin/velero
COPY --from=builder /workspace/restic/bin/restic /usr/bin/restic
COPY --from=ose-cli /usr/bin/oc /usr/bin/oc
COPY --from=builder /workspace/kopia/kopia /usr/bin/kopia
COPY --from=builder /workspace/gather /usr/bin/gather
COPY --from=builder /workspace/deprecated/gather_* /usr/bin/
COPY --from=builder /workspace/LICENSE /licenses/
ENTRYPOINT /usr/bin/gather