2023-06-09 10:40:49 +00:00
|
|
|
FROM golang:1.20-alpine AS builder
|
2017-06-23 08:26:51 +00:00
|
|
|
|
2021-09-20 12:18:48 +00:00
|
|
|
WORKDIR /go/src/github.com/restic/restic
|
|
|
|
|
|
|
|
# Caching dependencies
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
RUN go run build.go
|
|
|
|
|
|
|
|
FROM alpine:latest AS restic
|
2017-06-23 08:26:51 +00:00
|
|
|
|
2023-10-01 10:00:15 +00:00
|
|
|
RUN apk add --no-cache ca-certificates fuse openssh-client tzdata jq
|
2017-06-23 08:38:19 +00:00
|
|
|
|
2021-09-20 12:18:48 +00:00
|
|
|
COPY --from=builder /go/src/github.com/restic/restic/restic /usr/bin
|
|
|
|
|
2017-06-23 08:26:51 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/restic"]
|