2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 19:08:55 +00:00
restic/docker/Dockerfile

19 lines
375 B
Docker
Raw Normal View History

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
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"]