Skip to content

Commit

Permalink
Merge pull request #12 from dell/release-1.5.0
Browse files Browse the repository at this point in the history
Release 1.5.0
  • Loading branch information
bpjain2004 authored Mar 22, 2021
2 parents 6757778 + 5ccf2fd commit 964a54c
Show file tree
Hide file tree
Showing 73 changed files with 2,631 additions and 2,122 deletions.
69 changes: 14 additions & 55 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,14 @@
# 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 microdnf install -y \
e4fsprogs \
libaio \
libuuid \
nfs-utils \
numactl \
xfsprogs && \
microdnf clean all
# copy in the driver
COPY --from=builder /go/src/csi-isilon /
ENTRYPOINT ["/csi-isilon"]

# 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 microdnf install -y --enablerepo=ubi-8-baseos tar && \
microdnf clean all && \
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

# final stage
# simple stage to use the driver image as the resultant image
FROM driver as final

LABEL vendor="Dell Inc." \
name="csi-isilon" \
summary="CSI Driver for Dell EMC PowerScale" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerScale" \
version="1.4.0" \
license="Apache-2.0"

COPY ./licenses /licenses
ARG GOPROXY

FROM centos:8
ARG GOPROXY
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
RUN yum install -y nfs-utils
RUN yum --enablerepo=cr update -y
RUN yum clean all
COPY "csi-isilon" .
ENTRYPOINT ["/csi-isilon"]
55 changes: 55 additions & 0 deletions Dockerfile.podman
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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 microdnf install -y \
e4fsprogs \
libaio \
libuuid \
nfs-utils \
numactl \
xfsprogs && \
microdnf clean all
# copy in the driver
COPY --from=builder /go/src/csi-isilon /
ENTRYPOINT ["/csi-isilon"]

# 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 microdnf install -y --enablerepo=ubi-8-baseos tar && \
microdnf clean all && \
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

# final stage
# simple stage to use the driver image as the resultant image
FROM driver as final

LABEL vendor="Dell Inc." \
name="csi-isilon" \
summary="CSI Driver for Dell EMC PowerScale" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerScale" \
version="1.5.0" \
license="Apache-2.0"

COPY ./licenses /licenses
4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
unused-packages = true

[[constraint]]
name = "github.com/rexray/gocsi"
version = "0.4.0"
name = "github.com/dell/gocsi"
version = "1.2.3"
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ build: dependencies check
GOOS=linux CGO_ENABLED=0 go build

# Generates the docker container (but does not push)
docker: dependencies
make -f docker.mk docker
podman-build:
make -f docker.mk podman-build

dev-build: build
make -f docker.mk docker-build

# Pushes container to the repository
push: docker
make -f docker.mk push
podman-build-image-push: podman-build
make -f docker.mk podman-build-image-push

dev-build-image-push: dev-build
make -f docker.mk docker-build-image-push

# Windows or Linux; requires no hardware
unit-test:
Expand Down
Loading

0 comments on commit 964a54c

Please sign in to comment.