mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 08:23:47 +01:00
578b9df6ea
Unexpectedly the team which runs the Go docker images have removed the arm/v6 image which means that the rclone docker images no longer build. One of the recommended fixes is what we've done here - switch to the alpine builder. This has the advantage that it actually builds arm/v6 architecture unlike the previous builder which build arm/v5. See: https://github.com/docker-library/golang/issues/502
26 lines
573 B
Docker
26 lines
573 B
Docker
FROM golang:alpine AS builder
|
|
|
|
COPY . /go/src/github.com/rclone/rclone/
|
|
WORKDIR /go/src/github.com/rclone/rclone/
|
|
|
|
RUN apk add --no-cache make bash gawk git
|
|
RUN \
|
|
CGO_ENABLED=0 \
|
|
make
|
|
RUN ./rclone version
|
|
|
|
# Begin final image
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache add ca-certificates fuse3 tzdata && \
|
|
echo "user_allow_other" >> /etc/fuse.conf
|
|
|
|
COPY --from=builder /go/src/github.com/rclone/rclone/rclone /usr/local/bin/
|
|
|
|
RUN addgroup -g 1009 rclone && adduser -u 1009 -Ds /bin/sh -G rclone rclone
|
|
|
|
ENTRYPOINT [ "rclone" ]
|
|
|
|
WORKDIR /data
|
|
ENV XDG_CONFIG_HOME=/config
|