Skip to content

Commit

Permalink
Merge pull request #66 from ywk253100/210820_distroless
Browse files Browse the repository at this point in the history
Change the base image to distroless
  • Loading branch information
sseago authored Aug 26, 2021
2 parents 558d306 + 4549c14 commit 5de0845
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ COPY . /go/src/velero-plugin-for-gcp
WORKDIR /go/src/velero-plugin-for-gcp
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /go/bin/velero-plugin-for-gcp ./velero-plugin-for-gcp

FROM busybox:1.33.1 AS busybox

FROM ubuntu:bionic
RUN mkdir /plugins
FROM gcr.io/distroless/base-debian10:nonroot
COPY --from=build /go/bin/velero-plugin-for-gcp /plugins/
USER nobody:nogroup
ENTRYPOINT ["/bin/bash", "-c", "cp /plugins/* /target/."]
COPY --from=busybox /bin/cp /bin/cp
USER nonroot:nonroot
ENTRYPOINT ["cp", "/plugins/velero-plugin-for-gcp", "/target/."]

0 comments on commit 5de0845

Please sign in to comment.