Skip to content

Commit

Permalink
Add UBI Dockerfiles for Konveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
dymurray authored and sseago committed Apr 13, 2021
1 parent 5bd70fd commit 00c1eb6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile-velero-restic-restore-helper.ubi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM openshift/origin-release:golang-1.14 AS builder
COPY . /go/src/github.com/vmware-tanzu/velero
RUN cd /go/src/github.com/vmware-tanzu/velero \
&& CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -mod=mod ./cmd/velero-restic-restore-helper

FROM registry.access.redhat.com/ubi8-minimal
RUN microdnf -y update && microdnf clean all

COPY --from=builder /go/src/github.com/vmware-tanzu/velero/velero-restic-restore-helper /velero-restic-restore-helper

USER nobody:nobody

ENTRYPOINT [ "/velero-restic-restore-helper" ]
21 changes: 21 additions & 0 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM openshift/origin-release:golang-1.14 AS builder
COPY . /go/src/github.com/vmware-tanzu/velero
RUN cd /go/src/github.com/vmware-tanzu/velero \
&& CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static" -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=v1.3.0-konveyor' -mod=mod ./cmd/velero

RUN mkdir /go/src/github.com/restic \
&& cd /go/src/github.com/restic \
&& git clone https://github.com/konveyor/restic -b konveyor-dev \
&& cd /go/src/github.com/restic/restic \
&& CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' ./cmd/restic

FROM registry.access.redhat.com/ubi8-minimal
RUN microdnf -y install nmap-ncat && microdnf clean all
RUN microdnf -y update && microdnf clean all

COPY --from=builder /go/src/github.com/vmware-tanzu/velero/velero velero
COPY --from=builder /go/src/github.com/restic/restic/restic /usr/bin/restic

USER nobody:nobody

ENTRYPOINT ["/velero"]

0 comments on commit 00c1eb6

Please sign in to comment.