2021-09-20 12:18:48 +00:00
|
|
|
FROM golang:1.16-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
|
|
|
|
2020-11-27 07:05:19 +00:00
|
|
|
RUN apk add --update --no-cache ca-certificates fuse openssh-client tzdata
|
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"]
|