2024-03-03 16:18:13 +05:30
|
|
|
FROM golang:1.22-alpine AS builder
|
2017-06-23 10:26:51 +02:00
|
|
|
|
2021-09-20 14:18:48 +02: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 10:26:51 +02:00
|
|
|
|
2023-10-01 18:00:15 +08:00
|
|
|
RUN apk add --no-cache ca-certificates fuse openssh-client tzdata jq
|
2017-06-23 10:38:19 +02:00
|
|
|
|
2021-09-20 14:18:48 +02:00
|
|
|
COPY --from=builder /go/src/github.com/restic/restic/restic /usr/bin
|
|
|
|
|
2017-06-23 10:26:51 +02:00
|
|
|
ENTRYPOINT ["/usr/bin/restic"]
|