feat: add rclone binary to docker image and arm64 support (#105)

This commit is contained in:
Gareth
2024-02-19 12:24:44 -08:00
committed by GitHub
parent 147feb409f
commit 5a49f2f063
5 changed files with 33 additions and 17 deletions
+4 -1
View File
@@ -16,6 +16,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
@@ -31,7 +34,7 @@ jobs:
with:
distribution: goreleaser
version: latest
args: build --snapshot --clean
args: release --snapshot --clean
- name: Test
run: PATH=$(pwd):$PATH go test ./...
+3
View File
@@ -18,6 +18,9 @@ jobs:
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
+24 -2
View File
@@ -52,8 +52,30 @@ archives:
dockers:
- image_templates:
- garethgeorge/backrest:latest
- garethgeorge/backrest:{{ .Tag }}
- garethgeorge/backrest:{{ .Tag }}-amd64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- image_templates:
- garethgeorge/backrest:{{ .Tag }}-arm64
goarch: arm64
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: "garethgeorge/backrest:latest"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-amd64"
- "garethgeorge/backrest:{{ .Tag }}-arm64"
- name_template: "garethgeorge/backrest:{{ .Tag }}"
image_templates:
- "garethgeorge/backrest:{{ .Tag }}-amd64"
- "garethgeorge/backrest:{{ .Tag }}-arm64"
changelog:
sort: asc
+2 -6
View File
@@ -1,13 +1,9 @@
FROM golang:alpine as gobuild
RUN mkdir /tmp-orig
COPY backrest /backrest
FROM rclone/rclone:1.65 as rclone
FROM alpine:latest
COPY --from=gobuild /tmp-orig /tmp
COPY --from=rclone /usr/local/bin/rclone /usr/local/bin/rclone
RUN apk --no-cache add ca-certificates bash curl
RUN apk --no-cache add ca-certificates curl bash
RUN mkdir -p /tmp
ENTRYPOINT ["/backrest"]
COPY backrest /backrest
-8
View File
@@ -1,8 +0,0 @@
FROM garethgeorge/backrest:latest AS backrest
FROM ubuntu:14.04 AS ubuntu
COPY --from=backrest /tmp /tmp
COPY --from=backrest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=backrest /backrest /backrest
# install custom binaries for use with backrest hooks
RUN apt-get update && apt-get install -y curl bash
ENTRYPOINT ["/backrest"]