-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
grosnj1
authored and
grosnj1
committed
Sep 22, 2020
1 parent
2facca1
commit 695701c
Showing
93 changed files
with
4,102 additions
and
772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
csi-scaleio | ||
|
||
/csi-vxflexos | ||
helm/.ps.out | ||
service/c.out | ||
service/test/ | ||
test/integration/c.linux.out | ||
test/integration/stderr | ||
semver.mk | ||
goscaleio/ | ||
gofsutil/ |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,71 @@ | ||
FROM centos:7.6.1810 | ||
RUN yum install -y libaio | ||
RUN yum install -y libuuid | ||
RUN yum install -y numactl | ||
RUN yum install -y xfsprogs | ||
RUN yum install -y e4fsprogs | ||
COPY "csi-vxflexos" . | ||
COPY "csi-vxflexos.sh" . | ||
RUN chmod +x csi-vxflexos.sh | ||
# some arguments that must be supplied | ||
ARG GOPROXY | ||
ARG GOVERSION | ||
ARG BASEIMAGE | ||
|
||
|
||
# Stage to build the driver | ||
FROM golang:${GOVERSION} as builder | ||
ARG GOPROXY | ||
RUN mkdir -p /go/src | ||
COPY ./ /go/src/ | ||
WORKDIR /go/src/ | ||
RUN CGO_ENABLED=0 \ | ||
make build | ||
|
||
# Stage to build the driver image | ||
FROM $BASEIMAGE AS driver | ||
# install necessary packages | ||
# alphabetical order for easier maintenance | ||
RUN yum update -y && \ | ||
yum install -y \ | ||
e4fsprogs \ | ||
libaio \ | ||
libuuid \ | ||
numactl \ | ||
xfsprogs && \ | ||
yum clean all | ||
ENTRYPOINT ["/csi-vxflexos.sh"] | ||
# copy in the driver | ||
COPY --from=builder /go/src/csi-vxflexos / | ||
COPY "csi-vxflexos.sh" / | ||
RUN chmod +x /csi-vxflexos.sh | ||
|
||
# stage to run gosec | ||
FROM builder as gosec | ||
RUN go get github.com/securego/gosec/cmd/gosec | ||
RUN cd /go/src && \ | ||
gosec ./... | ||
|
||
# Stage to check for critical and high CVE issues via Trivy (https://github.com/aquasecurity/trivy) | ||
# will break image build if CRITICAL issues found | ||
# will print out all HIGH issues found | ||
FROM driver as cvescan | ||
# run trivy and clean up all traces after | ||
RUN curl https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh && \ | ||
trivy fs -s CRITICAL --exit-code 1 / && \ | ||
trivy fs -s HIGH / && \ | ||
trivy image --reset && \ | ||
rm ./bin/trivy | ||
|
||
# Stage to run antivirus scans via clamav (https://www.clamav.net/)) | ||
# will break image build if anything found | ||
FROM driver as virusscan | ||
# run trivy and clean up all traces after | ||
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ | ||
yum install -y clamav clamav-update && \ | ||
freshclam && \ | ||
clamscan -r -i --exclude-dir=/sys / && \ | ||
yum erase -y clamav clamav-update epel-release | ||
|
||
# final stage | ||
# simple stage to use the driver image as the resultant image | ||
FROM driver as final | ||
|
||
LABEL vendor="Dell Inc." \ | ||
name="csi-powerflex" \ | ||
summary="CSI Driver for Dell EMC PowerFlex" \ | ||
description="CSI Driver for provisioning persistent storage from Dell EMC PowerFlex" \ | ||
version="1.2.0" \ | ||
license="Apache-2.0" | ||
COPY ./licenses /licenses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.