Multi-arch build
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -1,4 +1,19 @@
|
||||
FROM restic/restic:0.15.1
|
||||
RUN apk add --no-cache jq curl
|
||||
FROM golang:1.19-alpine AS builder
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/backup.sh"]
|
||||
ENV RESTIC_VERSION 0.15.1
|
||||
|
||||
RUN apk add --no-cache git
|
||||
RUN git clone --depth 1 --branch v${RESTIC_VERSION} https://github.com/restic/restic.git /go/src/github.com/restic/restic
|
||||
|
||||
WORKDIR /go/src/github.com/restic/restic
|
||||
|
||||
RUN go mod download
|
||||
RUN go run build.go
|
||||
|
||||
FROM alpine:latest AS restic
|
||||
|
||||
RUN apk add --update --no-cache ca-certificates fuse openssh-client tzdata jq curl
|
||||
|
||||
COPY --from=builder /go/src/github.com/restic/restic/restic /usr/bin
|
||||
|
||||
ENTRYPOINT ["/usr/bin/restic"]
|
||||
|
||||
Reference in New Issue
Block a user