diff --git a/build/Dockerfile b/build/Dockerfile index d60af982..dd1ac4b6 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,11 +1,8 @@ -FROM centos:7.2.1511 -RUN curl -o /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo && \ - yum install -y wget bind-utils jq fuse +FROM ghcr.io/cubefs/cfs-csi-base:v0.0.1 RUN mkdir -p /cfs/bin /cfs/conf /cfs/logs -ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd64 /bin/tini +ADD start.sh /cfs/bin ADD bin/cfs-client /cfs/bin ADD bin/cfs-csi-driver /cfs/bin -ADD start.sh /cfs/bin RUN chmod +x /bin/tini && chmod +x /cfs/bin/cfs-client && chmod +x /cfs/bin/cfs-csi-driver && chmod +x /cfs/bin/start.sh ENTRYPOINT [ "/bin/tini", "--" ] CMD [""] \ No newline at end of file diff --git a/build/base.Dockerfile b/build/base.Dockerfile new file mode 100644 index 00000000..8059476e --- /dev/null +++ b/build/base.Dockerfile @@ -0,0 +1,5 @@ +FROM centos:7 +RUN yum install -y wget bind-utils jq fuse && \ + yum clean all && rm -rf /var/cache/yum +ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd64 /bin/tini +RUN chmod +x /bin/tini \ No newline at end of file diff --git a/build/build_cfs_csi_driver.sh b/build/build_cfs_csi_driver.sh index 1a646558..2603f240 100755 --- a/build/build_cfs_csi_driver.sh +++ b/build/build_cfs_csi_driver.sh @@ -11,6 +11,7 @@ Branch=$(git symbolic-ref --short -q HEAD) BuildTime=$(date +%Y-%m-%dT%H:%M) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ + -trimpath \ -gcflags=-trimpath=$(pwd) -asmflags=-trimpath=$(pwd) \ -ldflags="-s -w -X main.CommitID=${CommitID} -X main.BuildTime=${BuildTime} -X main.Branch=${Branch} " \ -o ${RootPath}/bin/cfs-csi-driver ../cmd && echo "build cfs-csi-driver success" diff --git a/deploy/csi-controller-deployment.yaml b/deploy/csi-controller-deployment.yaml index e5e68185..5054712b 100644 --- a/deploy/csi-controller-deployment.yaml +++ b/deploy/csi-controller-deployment.yaml @@ -79,7 +79,7 @@ spec: - mountPath: /csi name: socket-dir - name: cfs-driver - image: ghcr.io/cubefs/cfs-csi-driver:3.1.0.150.0 + image: ghcr.io/cubefs/cfs-csi-driver:3.2.0.150.0 imagePullPolicy: IfNotPresent securityContext: privileged: true diff --git a/deploy/csi-node-daemonset.yaml b/deploy/csi-node-daemonset.yaml index ea0623ec..7d34144d 100644 --- a/deploy/csi-node-daemonset.yaml +++ b/deploy/csi-node-daemonset.yaml @@ -49,7 +49,7 @@ spec: - mountPath: /registration name: registration-dir - name: cfs-driver - image: ghcr.io/cubefs/cfs-csi-driver:3.1.0.150.0 + image: ghcr.io/cubefs/cfs-csi-driver:3.2.0.150.0 imagePullPolicy: IfNotPresent securityContext: privileged: true