1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-11-21 23:58:06 +00:00

Use COPY instead of ADD in Dockerfile (#502)

This commit is contained in:
gy741 2019-11-28 01:25:19 +09:00 committed by Roberto Rojas
parent 9c6d4de860
commit 230d286708

View File

@ -1,9 +1,9 @@
FROM golang:1.12 AS build
WORKDIR /go/src/github.com/aquasecurity/kube-bench/
ADD go.mod go.sum ./
ADD main.go .
ADD check/ check/
ADD cmd/ cmd/
COPY go.mod go.sum ./
COPY main.go .
COPY check/ check/
COPY cmd/ cmd/
ARG KUBEBENCH_VERSION
RUN GO111MODULE=on CGO_ENABLED=0 go install -a -ldflags "-X github.com/aquasecurity/kube-bench/cmd.KubeBenchVersion=${KUBEBENCH_VERSION} -w"
@ -13,8 +13,8 @@ WORKDIR /opt/kube-bench/
# https://github.com/aquasecurity/kube-bench/issues/109
RUN apk --no-cache add procps
COPY --from=build /go/bin/kube-bench /usr/local/bin/kube-bench
ADD entrypoint.sh .
ADD cfg/ cfg/
COPY entrypoint.sh .
COPY cfg/ cfg/
ENTRYPOINT ["./entrypoint.sh"]
CMD ["install"]