github.com/khulnasoft-lab/kube-bench@v0.2.1-0.20240330183753-9df52345ae58/Dockerfile.fips.ubi (about) 1 FROM golang:1.22.0 AS build 2 WORKDIR /go/src/github.com/khulnasoft-lab/kube-bench/ 3 COPY makefile makefile 4 COPY go.mod go.sum ./ 5 COPY main.go . 6 COPY check/ check/ 7 COPY cmd/ cmd/ 8 COPY internal/ internal/ 9 ARG KUBEBENCH_VERSION 10 RUN make build-fips && cp kube-bench /go/bin/kube-bench 11 12 13 # ubi8-minimal base image for build with ubi standards 14 FROM registry.access.redhat.com/ubi8/ubi-minimal as run 15 16 RUN microdnf install -y yum findutils openssl \ 17 && yum -y update-minimal --security --sec-severity=Moderate --sec-severity=Important --sec-severity=Critical \ 18 && yum update -y \ 19 && yum install -y glibc \ 20 && yum update -y glibc \ 21 && yum install -y procps \ 22 && yum update -y procps \ 23 && yum install jq -y \ 24 && yum clean all \ 25 && microdnf remove yum || rpm -e -v yum \ 26 && microdnf clean all 27 28 WORKDIR /opt/kube-bench/ 29 30 ENV PATH=$PATH:/usr/local/mount-from-host/bin 31 32 COPY LICENSE /licenses/LICENSE 33 COPY --from=build /go/bin/kube-bench /usr/local/bin/kube-bench 34 COPY entrypoint.sh . 35 COPY cfg/ cfg/ 36 ENTRYPOINT ["./entrypoint.sh"] 37 CMD ["install"] 38 39 40 # Build-time metadata as defined at http://label-schema.org 41 ARG BUILD_DATE 42 ARG VCS_REF 43 LABEL org.label-schema.build-date=$BUILD_DATE \ 44 org.label-schema.name="kube-bench" \ 45 org.label-schema.description="Run the CIS Kubernetes Benchmark tests" \ 46 org.label-schema.url="https://github.com/khulnasoft-lab/kube-bench" \ 47 org.label-schema.vcs-ref=$VCS_REF \ 48 org.label-schema.vcs-url="https://github.com/khulnasoft-lab/kube-bench" \ 49 org.label-schema.schema-version="1.0"