mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-11-22 08:08:07 +00:00
Use COPY instead of ADD in Dockerfile (#502)
This commit is contained in:
parent
9c6d4de860
commit
230d286708
12
Dockerfile
12
Dockerfile
@ -1,9 +1,9 @@
|
|||||||
FROM golang:1.12 AS build
|
FROM golang:1.12 AS build
|
||||||
WORKDIR /go/src/github.com/aquasecurity/kube-bench/
|
WORKDIR /go/src/github.com/aquasecurity/kube-bench/
|
||||||
ADD go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
ADD main.go .
|
COPY main.go .
|
||||||
ADD check/ check/
|
COPY check/ check/
|
||||||
ADD cmd/ cmd/
|
COPY cmd/ cmd/
|
||||||
ARG KUBEBENCH_VERSION
|
ARG KUBEBENCH_VERSION
|
||||||
RUN GO111MODULE=on CGO_ENABLED=0 go install -a -ldflags "-X github.com/aquasecurity/kube-bench/cmd.KubeBenchVersion=${KUBEBENCH_VERSION} -w"
|
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
|
# https://github.com/aquasecurity/kube-bench/issues/109
|
||||||
RUN apk --no-cache add procps
|
RUN apk --no-cache add procps
|
||||||
COPY --from=build /go/bin/kube-bench /usr/local/bin/kube-bench
|
COPY --from=build /go/bin/kube-bench /usr/local/bin/kube-bench
|
||||||
ADD entrypoint.sh .
|
COPY entrypoint.sh .
|
||||||
ADD cfg/ cfg/
|
COPY cfg/ cfg/
|
||||||
ENTRYPOINT ["./entrypoint.sh"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
CMD ["install"]
|
CMD ["install"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user