2024-01-03 17:26:13 +00:00
|
|
|
FROM golang:alpine AS builder
|
2019-08-29 10:04:57 +00:00
|
|
|
|
|
|
|
COPY . /go/src/github.com/rclone/rclone/
|
|
|
|
WORKDIR /go/src/github.com/rclone/rclone/
|
|
|
|
|
2024-01-03 17:26:13 +00:00
|
|
|
RUN apk add --no-cache make bash gawk git
|
2019-08-29 10:04:57 +00:00
|
|
|
RUN \
|
2020-04-11 18:12:10 +00:00
|
|
|
CGO_ENABLED=0 \
|
2019-08-29 10:04:57 +00:00
|
|
|
make
|
|
|
|
RUN ./rclone version
|
|
|
|
|
|
|
|
# Begin final image
|
|
|
|
FROM alpine:latest
|
|
|
|
|
2023-03-14 18:27:29 +00:00
|
|
|
RUN apk --no-cache add ca-certificates fuse3 tzdata && \
|
2020-06-01 20:31:35 +00:00
|
|
|
echo "user_allow_other" >> /etc/fuse.conf
|
2019-08-29 10:04:57 +00:00
|
|
|
|
2019-09-17 05:15:48 +00:00
|
|
|
COPY --from=builder /go/src/github.com/rclone/rclone/rclone /usr/local/bin/
|
2019-08-29 10:04:57 +00:00
|
|
|
|
2021-02-11 17:45:44 +00:00
|
|
|
RUN addgroup -g 1009 rclone && adduser -u 1009 -Ds /bin/sh -G rclone rclone
|
|
|
|
|
2019-09-17 05:15:48 +00:00
|
|
|
ENTRYPOINT [ "rclone" ]
|
2019-08-29 10:04:57 +00:00
|
|
|
|
2019-09-17 05:15:48 +00:00
|
|
|
WORKDIR /data
|
|
|
|
ENV XDG_CONFIG_HOME=/config
|