2022-11-03 22:59:59 +01:00
|
|
|
FROM golang:1.19-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
|
|
|
|
2020-11-27 08:05:19 +01:00
|
|
|
RUN apk add --update --no-cache ca-certificates fuse openssh-client tzdata
|
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"]
|