Skip to content

Commit

Permalink
fix: use a specific rclone CLI version
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Nov 10, 2024
1 parent 774a6ae commit 862a8d5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Dockerfile
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"]

0 comments on commit 862a8d5

Please sign in to comment.