Merge pull request #206 from nbyl/distroless-build-fix

fix build of debug image
This commit is contained in:
priyawadhwa 2018-06-20 09:37:01 -07:00 committed by GitHub
commit 4f4dda0563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -30,14 +30,14 @@ RUN make -C /go/src/github.com/awslabs/amazon-ecr-credential-helper linux-amd64
FROM gcr.io/cloud-builders/bazel:latest
RUN git clone https://github.com/GoogleContainerTools/distroless.git
WORKDIR /distroless
RUN bazel build busybox:busybox.tar
RUN tar -C /distroless/bazel-genfiles/busybox/ -xf /distroless/bazel-genfiles/busybox/busybox.tar
RUN bazel build //experimental/busybox:busybox.tar
RUN tar -C /distroless/bazel-genfiles/experimental/busybox/ -xf /distroless/bazel-genfiles/experimental/busybox/busybox.tar
FROM scratch
COPY --from=0 /go/src/github.com/GoogleContainerTools/kaniko/out/executor /kaniko/executor
COPY --from=0 /usr/local/bin/docker-credential-gcr /kaniko/docker-credential-gcr
COPY --from=0 /go/src/github.com/awslabs/amazon-ecr-credential-helper/bin/linux-amd64/docker-credential-ecr-login /kaniko/docker-credential-ecr-login
COPY --from=1 /distroless/bazel-genfiles/busybox/busybox/ /busybox/
COPY --from=1 /distroless/bazel-genfiles/experimental/busybox/busybox/ /busybox/
COPY files/ca-certificates.crt /kaniko/ssl/certs/
COPY files/config.json /kaniko/.docker/
ENV HOME /root