-
Notifications
You must be signed in to change notification settings - Fork 45
example compiling inside docker as well #34
Copy link
Copy link
Open
Description
just an example for people don't want to install specific go version on the local machine...
diff --git a/deploy/image/Dockerfile b/deploy/image/Dockerfile
index 9773a1e..f44d4a5 100644
--- a/deploy/image/Dockerfile
+++ b/deploy/image/Dockerfile
@@ -4,11 +4,15 @@
#
# XXX: pin alpine to 3.8 with e2fsprogs-1.44
# e2fsprogs-1.45+ crashes my test vm when running mkfs.ext4
+FROM docker.io/library/golang:1.22.0-alpine3.19 as builder
+COPY . .
+RUN CGO_ENABLED=0 GOOS=linux go build -buildvcs=false -o /tmp/spdkcsi ./cmd/
+
FROM alpine:3.8
LABEL maintainers="SPDK-CSI Authors"
LABEL description="SPDK-CSI Plugin"
-COPY spdkcsi /usr/local/bin/spdkcsi
+COPY --from=builder /tmp/spdkcsi /usr/local/bin/spdkcsi
RUN apk add nvme-cli open-iscsi e2fsprogs xfsprogs blkid
(END)
and then
docker build -t spdkcsi/spdkcsi:canary -f deploy/image/Dockerfile .
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels