forked from wunderio/csi-rclone
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use a specific rclone CLI version
- Loading branch information
Showing
1 changed file
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
FROM golang:1.23.0-bookworm AS build | ||
COPY . . | ||
ARG RCLONE_VERSION=v1.65.2 | ||
ARG RCLONE_ARCH=amd64 | ||
ARG RCLONE_OS=linux | ||
COPY go.mod go.sum ./ | ||
COPY cmd/ ./cmd/ | ||
COPY pkg/ ./pkg/ | ||
RUN go build -o /csi-rclone cmd/csi-rclone-plugin/main.go | ||
RUN apt-get update && apt-get install -y unzip && \ | ||
curl https://downloads.rclone.org/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-${RCLONE_OS}-${RCLONE_ARCH}.zip -o rclone.zip && \ | ||
unzip rclone.zip -d /rclone-unzip && \ | ||
chmod a+x /rclone-unzip/*/rclone && \ | ||
mv /rclone-unzip/*/rclone / | ||
|
||
FROM debian:bookworm-slim | ||
# NOTE: the rclone package in apt does not install ca-certificates or fuse3 | ||
# which it both needs to successfully mount cloud storage | ||
RUN apt-get update && apt-get install -y fuse3 rclone ca-certificates && rm -rf /var/cache/apt/archives /var/lib/apt/lists/* | ||
# NOTE: the rclone needs ca-certificates and fuse3 to successfully mount cloud storage | ||
RUN apt-get update && apt-get install -y fuse3 ca-certificates && rm -rf /var/cache/apt/archives /var/lib/apt/lists/* | ||
COPY --from=build /csi-rclone /csi-rclone | ||
COPY --from=build /rclone /usr/bin/ | ||
ENTRYPOINT ["/csi-rclone"] |