Skip to content

Commit

Permalink
Merge pull request #59 from Hansyangxingxiang/master
Browse files Browse the repository at this point in the history
1. Package qbd to the csi-neonsan image; 2. The csi-neonsan image does not distinguish between OS versions; 3. Support both ARM and X86
  • Loading branch information
stoneshi-yunify authored Oct 17, 2022
2 parents 13d7b09 + 338e3fb commit a80adda
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 138 deletions.
18 changes: 4 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,14 @@
.PHONY: all disk

IMAGE=csiplugin/csi-neonsan
TAG=canary
UBUNTU_VERSION=1604
IMAGE_UBUNTU=csiplugin/csi-neonsan-ubuntu${UBUNTU_VERSION}
TAG_UBUNTU=canary
IMAGE_CENTOS=csiplugin/csi-neonsan-centos
TAG_CENTOS=canary
TAG=v2.3.0
ROOT_PATH=$(pwd)
ARCH=$(shell arch)
PACKAGE_LIST=./cmd/... ./pkg/...

container:
docker build -t ${IMAGE}:${TAG} -f deploy/neonsan/docker/Dockerfile .

container-ubuntu:
docker build -t ${IMAGE_UBUNTU}:${TAG_UBUNTU} -f deploy/neonsan/docker/ubuntu/${UBUNTU_VERSION}.Dockerfile .

container-centos:
docker build -t ${IMAGE_CENTOS}:${TAG_CENTOS} -f deploy/neonsan/docker/centos/Dockerfile .

docker build -t ${IMAGE}:${TAG} -f deploy/neonsan/docker/${ARCH}/Dockerfile .

mod:
go build ./...
go mod download
Expand Down
29 changes: 0 additions & 29 deletions deploy/neonsan/docker/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ FROM golang:1.14.4-alpine as builder
WORKDIR /qingstor-csi
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=vendor -ldflags "-s -w" -o _output/neonsan-csi-driver ./cmd/neonsan
COPY deploy/neonsan/qbd/aarch64/pitrix-dep-qbd-util-*.deb _output/


FROM ubuntu:18.04
LABEL maintainers="Yunify"
Expand All @@ -27,6 +29,8 @@ RUN apt-get update -y && \
apt-get install -y libcurl4 libicu60 && \
apt-get install -y e2fsprogs xfsprogs mount ca-certificates udev
COPY --from=builder /qingstor-csi/_output/neonsan-csi-driver /neonsan-csi-driver
COPY --from=builder /qingstor-csi/_output/pitrix-dep-qbd-util-*.deb /root/
RUN dpkg -i /root/pitrix-dep-qbd-util-*.deb && rm -rf /root/pitrix-dep-qbd-util-*.deb
RUN chmod +x /neonsan-csi-driver && \
mkdir -p /var/log/neonsan-csi-driver
ENTRYPOINT ["/neonsan-csi-driver"]
31 changes: 0 additions & 31 deletions deploy/neonsan/docker/centos/Dockerfile

This file was deleted.

32 changes: 0 additions & 32 deletions deploy/neonsan/docker/ubuntu/1604.Dockerfile

This file was deleted.

32 changes: 0 additions & 32 deletions deploy/neonsan/docker/ubuntu/2004.Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ FROM golang:1.14.4-alpine as builder
WORKDIR /qingstor-csi
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=vendor -ldflags "-s -w" -o _output/neonsan-csi-driver ./cmd/neonsan
COPY deploy/neonsan/qbd/x86_64/pitrix-dep-qbd-util-*.deb _output/

FROM ubuntu:16.04
LABEL maintainers="Yunify"
Expand All @@ -27,6 +28,8 @@ RUN apt-get update -y && \
apt-get install -y libcurl3 libicu55 && \
apt-get install -y e2fsprogs xfsprogs mount ca-certificates udev
COPY --from=builder /qingstor-csi/_output/neonsan-csi-driver /neonsan-csi-driver
COPY --from=builder /qingstor-csi/_output/pitrix-dep-qbd-util-*.deb /root/
RUN dpkg -i /root/pitrix-dep-qbd-util-*.deb && rm -rf /root/pitrix-dep-qbd-util-*.deb
RUN chmod +x /neonsan-csi-driver && \
mkdir -p /var/log/neonsan-csi-driver
ENTRYPOINT ["/neonsan-csi-driver"]
Binary file not shown.
Binary file not shown.

0 comments on commit a80adda

Please sign in to comment.