FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
node_modules .git *.log *.tmp Dockerfile .dockerignore build *.md docs/
Build timed out after 600s
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
Build timed out after 600s
Build timed out after 600s
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
Build timed out after 600s
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
Build timed out after 600s
Image golang:tip-alpine3.23 exists on Docker Hub.
Image golang:1.20-alpine3.18 exists on Docker Hub.
Image golang:1.26-alpine3.17 NOT found on Docker Hub.
Image golang:1.26-alpine3.23 exists on Docker Hub.
FROM golang:1.26-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
Build timed out after 600s
FROM --platform=$BUILDPLATFORM golang:1.26-alpine3.23 AS builder
ENV CGO_ENABLED=0
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
COPY go.mod go.sum ./
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
FROM golang:1.26-alpine3.23 AS builder
ENV CGO_ENABLED=0
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
# Download dependencies first for layer caching
COPY go.mod go.sum ./
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
# Copy source and build
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:latest
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
- Exact error message and exit code:
- /bin/sh: make: not found
- Exit code: 127
- Failing command/step:
- [builder 7/8] RUN echo "**** Build Binary ****" && make
- Missing packages or files mentioned:
- make is not installed in the builder image (Alpine-based Go build stage). Install build tools, e.g. apk add --no-cache build-base (or at least make).
- Version mismatch info:
- Images used:
- Stage-1 base: alpine:latest
- Builder: golang:1.26-alpine3.23
- No explicit version mismatch error is shown in the log.FROM golang:1.26-alpine3.23 AS builder ENV CGO_ENABLED=0 WORKDIR /go/src/github.com/rclone/rclone/ RUN apk add --no-cache make bash gawk git # Download dependencies first for layer caching COPY go.mod go.sum ./ RUN go mod download -x COPY . . RUN make RUN ./rclone version # Begin final image FROM alpine:latest RUN apk add --no-cache ca-certificates fuse3 tzdata && echo "Enable user_allow_other in fuse" && 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
Build timed out after 600s
FROM golang:1.26-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:3.23
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
USER rclone
ENTRYPOINT [ "rclone" ]
WORKDIR /data
ENV XDG_CONFIG_HOME=/config
# Ignore VCS and build artifacts .git .gitignore .github/ build/ docs/public/ docs/.site/ *.log *.tmp *.bak vendor/ node_modules/ *.sh *.md Dockerfile.lock .rustup .dockerignore
Build timed out after 600s
FROM golang:1.26-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make rclone
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:3.23
RUN echo "**** Install Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
USER rclone
ENTRYPOINT [ "rclone" ]
WORKDIR /data
ENV XDG_CONFIG_HOME=/config
Build timed out after 600s
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone/
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Build Dependencies ****" && \
apk add --no-cache \
make \
bash \
gawk \
git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Dependencies ****" && \
go mod download -x
RUN echo "**** Verify Go Dependencies ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Begin final image
FROM alpine:3.23
RUN echo "**** Install Runtime Dependencies ****" && \
apk add --no-cache \
ca-certificates \
fuse3 \
tzdata && \
echo "Enable user_allow_other in fuse" && \
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
USER rclone
ENTRYPOINT [ "rclone" ]
WORKDIR /data
ENV XDG_CONFIG_HOME=/config
Build timed out after 600s
# Multi-stage Dockerfile to build rclone from source
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone
# Cache Go modules
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Build Dependencies ****" && \
apk add --no-cache make bash gawk git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Modules ****" && \
go mod download -x
RUN echo "**** Verify Go Modules ****" && \
go mod verify
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Final runtime image
FROM alpine:latest
RUN echo "**** Install Runtime Dependencies ****" && \
apk add --no-cache ca-certificates fuse3 tzdata && \
echo "Enable user_allow_other in fuse" && \
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
# Ignore vendor files and large build artifacts **/vendor **/.git **/.git/** **/node_modules **/build **/dist **/*.exe **/*.dll **/*.so **/*.dylib Dockerfile .dockerignore
Build timed out after 600s
# Multi-stage Dockerfile to build rclone from source
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone
# Cache Go modules
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Build Dependencies ****" && \
apk add --no-cache make bash gawk git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Modules ****" && \
go mod download -x
RUN echo "**** Verify Go Modules ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Final runtime image
FROM alpine:latest
RUN echo "**** Install Runtime Dependencies ****" && \
apk add --no-cache ca-certificates fuse3 tzdata && \
echo "Enable user_allow_other in fuse" && \
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
Build timed out after 600s
# Multi-stage Dockerfile to build rclone from source
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone
# Cache Go modules (note: avoid BuildKit-specific mounts for compatibility)
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Build Dependencies ****" && \
apk add --no-cache make bash gawk git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Modules ****" && \
go mod download -x
RUN echo "**** Verify Go Modules ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Final runtime image
FROM alpine:latest
RUN echo "**** Install Runtime Dependencies ****" && \
apk add --no-cache ca-certificates fuse3 tzdata && \
echo "Enable user_allow_other in fuse" && \
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
USER rclone
ENTRYPOINT ["rclone"]
WORKDIR /data
ENV XDG_CONFIG_HOME=/config
Build timed out after 600s
# Multi-stage Dockerfile to build rclone from source
FROM golang:alpine AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /go/src/github.com/rclone/rclone
# Cache Go modules (note: avoid BuildKit-specific mounts for compatibility)
RUN echo "**** Set Go Environment Variables ****" && \
go env -w GOCACHE=/root/.cache/go-build
RUN echo "**** Install Build Dependencies ****" && \
apk add --no-cache make bash gawk git
COPY go.mod .
COPY go.sum .
RUN echo "**** Download Go Modules ****" && \
go mod download -x
RUN echo "**** Verify Go Modules ****" && \
go mod verify
COPY . .
RUN echo "**** Build Binary ****" && \
make
RUN echo "**** Print Version Binary ****" && \
./rclone version
# Final runtime image
FROM alpine:latest
RUN echo "**** Install Runtime Dependencies ****" && \
apk add --no-cache ca-certificates fuse3 tzdata && \
echo "Enable user_allow_other in fuse" && \
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
USER rclone
ENTRYPOINT ["rclone"]
WORKDIR /data
ENV XDG_CONFIG_HOME=/config
Build timed out after 600s
# Multi-stage Dockerfile to build rclone from source with a lightweight final image
FROM golang:tip-alpine3.23 AS builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED}
WORKDIR /build
# Copy module definitions and download dependencies first to leverage caching
COPY go.mod go.sum ./
RUN echo "**** Download Go Modules ****" && \
go mod download -x
COPY . .
# Build the binary directly (faster than running the full make target in CI environments)
RUN echo "**** Build Binary ****" && \
go build -trimpath -o /rclone
# Final runtime image
FROM alpine:latest
RUN echo "**** Install Runtime Dependencies ****" && \
apk add --no-cache ca-certificates fuse3 tzdata && \
echo "Enable user_allow_other in fuse" && \
echo "user_allow_other" >> /etc/fuse.conf
COPY --from=builder /rclone /usr/local/bin/rclone
RUN addgroup -g 1009 rclone && adduser -u 1009 -Ds /bin/sh -G rclone rclone
USER rclone
ENTRYPOINT ["rclone"]
WORKDIR /data
ENV XDG_CONFIG_HOME=/config
Build timed out after 600s