mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 06:07:44 +00:00
19 lines
384 B
Docker
19 lines
384 B
Docker
FROM golang:1.20-alpine AS builder
|
|
|
|
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
|
|
|
|
RUN apk add --update --no-cache ca-certificates fuse openssh-client tzdata jq
|
|
|
|
COPY --from=builder /go/src/github.com/restic/restic/restic /usr/bin
|
|
|
|
ENTRYPOINT ["/usr/bin/restic"]
|