rclone-rclone
FAILURE
175m 30s
History Source
SummaryIterations3Transcript40Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile1190 bytes written
text54 lines · 1190 chars
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
WRITEWriteFile· step #2
0s
.dockerignore72 bytes written
dockerignore10 lines · 72 chars
node_modules
.git
*.log
*.tmp
Dockerfile
.dockerignore
build
*.md
docs/
VERIFYVerifyBuild· step #3
10m 49s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #4
0s
Dockerfile1121 bytes written
text53 lines · 1121 chars
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
VERIFYVerifyBuild· step #5
10m 56s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
VERIFYVerifyBuild· step #6
10m 40s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #7
0s
Dockerfile1121 bytes written
text53 lines · 1121 chars
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
WRITEWriteFile· step #8
0s
Dockerfile1145 bytes written
text53 lines · 1145 chars
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
VERIFYVerifyBuild· step #9
10m 43s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #10
0s
Dockerfile1183 bytes written
text53 lines · 1183 chars
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
VERIFYVerifyBuild· step #11
10m 59s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
DOCKERDockerImageSearch· step #12
0s
search docker hubgolang:tip-alpine3.231 results
show lines1
Image golang:tip-alpine3.23 exists on Docker Hub.
DOCKERDockerImageSearch· step #13
0s
search docker hubgolang:1.20-alpine3.181 results
show lines1
Image golang:1.20-alpine3.18 exists on Docker Hub.
DOCKERDockerImageSearch· step #14
0s
search docker hubgolang:1.26-alpine3.171 results
show lines1
Image golang:1.26-alpine3.17 NOT found on Docker Hub.
DOCKERDockerImageSearch· step #15
0s
search docker hubgolang:1.26-alpine3.231 results
show lines1
Image golang:1.26-alpine3.23 exists on Docker Hub.
WRITEWriteFile· step #16
0s
Dockerfile1215 bytes written
text54 lines · 1215 chars
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
VERIFYVerifyBuild· step #17
10m 45s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #18
0s
Dockerfile944 chars
text42 lines · 944 chars
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
WRITEWriteFile· step #19
0s
Dockerfile988 bytes written
text42 lines · 988 chars
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
VERIFYVerifyBuild· step #20
3m 28s
VerifyBuildbuild_failed
Build error
- 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.
WRITEWriteFile· step #21
0s
Dockerfile682 bytes written
text32 lines · 682 chars
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
VERIFYVerifyBuild· step #22
11m 16s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
02Iteration 2
WRITEWriteFile· step #1
0s
Dockerfile1165 bytes written
text57 lines · 1165 chars
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
WRITEWriteFile· step #2
0s
.dockerignore178 bytes written
dockerignore18 lines · 178 chars
# 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
VERIFYVerifyBuild· step #3
11m 01s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #4
0s
Dockerfile1172 bytes written
text57 lines · 1172 chars
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
VERIFYVerifyBuild· step #5
10m 45s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #6
0s
Dockerfile1178 bytes written
text57 lines · 1178 chars
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
VERIFYVerifyBuild· step #7
10m 29s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
03Iteration 3
WRITEWriteFile· step #1
0s
Dockerfile1227 bytes written
text51 lines · 1227 chars
# 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
WRITEWriteFile· step #2
0s
.dockerignore172 bytes written
dockerignore14 lines · 172 chars
# Ignore vendor files and large build artifacts
**/vendor
**/.git
**/.git/**
**/node_modules
**/build
**/dist
**/*.exe
**/*.dll
**/*.so
**/*.dylib
Dockerfile
.dockerignore
VERIFYVerifyBuild· step #3
10m 35s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #4
1s
Dockerfile1158 bytes written
text50 lines · 1158 chars
# 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
VERIFYVerifyBuild· step #5
10m 43s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #6
0s
Dockerfile1228 bytes written
text52 lines · 1228 chars
# 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
VERIFYVerifyBuild· step #7
10m 59s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #8
0s
Dockerfile1220 bytes written
text52 lines · 1220 chars
# 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
VERIFYVerifyBuild· step #9
10m 34s
VerifyBuildbuild_failed
Build error
Build timed out after 600s
WRITEWriteFile· step #10
1s
Dockerfile989 bytes written
text39 lines · 989 chars
# 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
VERIFYVerifyBuild· step #11
10m 40s
VerifyBuildbuild_failed
Build error
Build timed out after 600s