|
| 1 | +FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25 AS builder |
| 2 | +COPY . /workspace |
| 3 | + |
| 4 | +####################################################################### |
| 5 | +####################################################################### |
| 6 | +# # |
| 7 | +# W W AA RRRR N N III N N GGG # |
| 8 | +# W W A A R R NN N I NN N G # |
| 9 | +# W W W AAAA RRRR N N N I N N N G GG # |
| 10 | +# W W W A A R R N NN I N NN G G # |
| 11 | +# W W A A R RR N N III N N GGG # |
| 12 | +# # |
| 13 | +# Any changes to the `velero` and `restic` sections below must also # |
| 14 | +# be reconciled in oadp-mustgather/Dockerfile.in for consistency. # |
| 15 | +####################################################################### |
| 16 | +# BEGIN # |
| 17 | +####################################################################### |
| 18 | + |
| 19 | +# velero |
| 20 | +WORKDIR /workspace/ |
| 21 | +ENV GOEXPERIMENT strictfipsruntime |
| 22 | +RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=readonly -ldflags '-X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v1.16.1-OADP' -tags strictfipsruntime -o ./bin/velero ./cmd/velero |
| 23 | +RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=readonly -tags strictfipsruntime -o ./bin/velero-restore-helper ./cmd/velero-restore-helper |
| 24 | +RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=readonly -tags strictfipsruntime -o ./bin/velero-helper ./cmd/velero-helper |
| 25 | + |
| 26 | +# restic |
| 27 | +WORKDIR /workspace/restic/ |
| 28 | +ENV GOEXPERIMENT strictfipsruntime |
| 29 | +RUN CGO_ENABLED=1 GOOS=linux go build -a -mod=readonly -tags strictfipsruntime -o ./bin/restic ./cmd/restic |
| 30 | +USER 65534:65534 |
| 31 | + |
| 32 | +####################################################################### |
| 33 | +# END # |
| 34 | +####################################################################### |
| 35 | + |
| 36 | +FROM registry.redhat.io/ubi9/ubi:latest |
| 37 | +RUN dnf -y reinstall tzdata && dnf clean all |
| 38 | +RUN dnf -y install less nmap-ncat openssl && dnf clean all |
| 39 | +COPY --from=builder /workspace/bin/velero velero |
| 40 | +COPY --from=builder /workspace/bin/velero-restore-helper velero-restore-helper |
| 41 | +COPY --from=builder /workspace/bin/velero-helper velero-helper |
| 42 | +COPY --from=builder /workspace/restic/bin/restic /usr/bin/restic |
| 43 | +COPY --from=builder /workspace/LICENSE /licenses/ |
| 44 | + |
| 45 | +RUN mkdir -p /home/velero |
| 46 | +RUN chmod -R 777 /home/velero |
| 47 | + |
| 48 | +USER 65534:65534 |
| 49 | +ENV HOME=/home/velero |
| 50 | + |
| 51 | +ENTRYPOINT ["/velero"] |
| 52 | + |
| 53 | +LABEL description="OpenShift API for Data Protection - Velero" |
| 54 | +LABEL io.k8s.description="OpenShift API for Data Protection - Velero" |
| 55 | +LABEL io.k8s.display-name="OADP Velero" |
| 56 | +LABEL io.openshift.tags="migration" |
| 57 | +LABEL summary="OpenShift API for Data Protection - Velero" |
0 commit comments