File tree Expand file tree Collapse file tree 4 files changed +24
-9
lines changed
Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 55 {
66 "name" : " master" ,
77 "platforms" : [
8- " linux/amd64"
8+ " linux/amd64" ,
9+ " linux/arm64"
910 ],
1011 "stable" : true ,
1112 "tests" : {
Original file line number Diff line number Diff line change 55 {
66 "name" : " master" ,
77 "platforms" : [
8- " linux/amd64"
8+ " linux/amd64" ,
9+ " linux/arm64"
910 ],
1011 "stable" : true ,
1112 "tests" : {
Original file line number Diff line number Diff line change @@ -7,17 +7,29 @@ RUN apk update && apk upgrade && \
77
88RUN git clone -b main https://github.com/iPromKnight/rclone-manager /source
99
10- FROM golang:1.24-alpine AS builder
10+ FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
11+
12+ ARG TARGETOS
13+ ARG TARGETARCH
1114
1215RUN apk add --no-cache git
1316
1417WORKDIR /app
1518
16- COPY --from=cloner /source/src/go.mod go.sum* ./
17- RUN go mod download
19+ COPY --from=cloner /source/src/go.mod /source/src/go.sum .
20+
21+ RUN --mount=type=cache,target=/go/pkg/mod \
22+ go mod download -x
23+
24+ COPY --from=cloner /source/src/. .
1825
19- COPY --from=cloner /source/src/ ./
20- RUN go build -o rclone-manager ./cmd/main.go
26+ RUN --mount=type=cache,target=/go/pkg/mod \
27+ --mount=type=cache,target=/root/.cache/go-build \
28+ CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
29+ go build -trimpath \
30+ -ldflags="-w -s" \
31+ -o /rclone-manager \
32+ cmd/main.go
2133
2234FROM ghcr.io/ipromknight/alpine:rolling
2335
@@ -38,7 +50,7 @@ RUN mkdir -p /data
3850
3951RUN ln -s /usr/bin/fusermount3 /usr/bin/fusermount
4052
41- COPY --from=builder --chmod=0755 /app/ rclone-manager /usr/local/bin/rclone-manager
53+ COPY --from=builder --chmod=0755 /rclone-manager /usr/local/bin/rclone-manager
4254
4355RUN echo "user_allow_other" >> /etc/fuse.conf
4456
Original file line number Diff line number Diff line change 55 {
66 "name" : " main" ,
77 "platforms" : [
8- " linux/amd64"
8+ " linux/amd64" ,
9+ " linux/arm64"
910 ],
1011 "stable" : true ,
1112 "tests" : {
You can’t perform that action at this time.
0 commit comments