Skip to content

Commit

Permalink
Update to ubi9 builder and base images (#308)
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Seago <sseago@redhat.com>
  • Loading branch information
sseago authored Feb 29, 2024
1 parent bce0519 commit 39a834d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# TODO! Find a real ubi8 image for golang 1.16
FROM quay.io/konveyor/builder:latest AS builder
FROM quay.io/konveyor/builder:ubi9-v1.20 AS builder
ENV GOPATH=$APP_ROOT
COPY . /go/src/github.com/vmware-tanzu/velero
WORKDIR /go/src/github.com/vmware-tanzu/velero
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static" -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=1.12.3' -o /go/src/velero github.com/vmware-tanzu/velero/cmd/velero
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static"' -o /go/src/velero-helper github.com/vmware-tanzu/velero/cmd/velero-helper

FROM quay.io/konveyor/builder:latest AS restic-builder
FROM quay.io/konveyor/builder:ubi9-v1.20 AS restic-builder
ENV GOPATH=$APP_ROOT
RUN mkdir -p $APP_ROOT/src/github.com/restic \
&& cd $APP_ROOT/src/github.com/restic \
&& git clone https://github.com/konveyor/restic -b oadp-1.3
WORKDIR $APP_ROOT/src/github.com/restic/restic
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static"' -o $APP_ROOT/src/restic github.com/restic/restic/cmd/restic

FROM registry.access.redhat.com/ubi8-minimal
FROM registry.access.redhat.com/ubi9-minimal
RUN microdnf -y update && microdnf -y install nmap-ncat && microdnf clean all
COPY --from=builder /go/src/velero velero
COPY --from=builder /go/src/velero-helper velero-helper
Expand Down

0 comments on commit 39a834d

Please sign in to comment.