Skip to content

Commit

Permalink
Merge pull request #69 from Huweicai/master
Browse files Browse the repository at this point in the history
feat: upgrade to 3.2.0 & separate base layer of image
  • Loading branch information
leonrayang committed Nov 27, 2022
2 parents 5bc27a8 + 8bad254 commit 2ccfd18
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
7 changes: 2 additions & 5 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 [""]
5 changes: 5 additions & 0 deletions build/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions build/build_cfs_csi_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion deploy/csi-controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/csi-node-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ccfd18

Please sign in to comment.