2025-11-16 08:22:40 -05:00
|
|
|
FROM golang:1.25-alpine AS builder
|
2017-06-23 04:26:51 -04:00
|
|
|
|
2021-09-20 08:18:48 -04: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
|
2023-10-01 06:00:15 -04:00
|
|
|
RUN apk add --no-cache ca-certificates fuse openssh-client tzdata jq
|
2017-06-23 04:38:19 -04:00
|
|
|
|
2021-09-20 08:18:48 -04:00
|
|
|
COPY --from=builder /go/src/github.com/restic/restic/restic /usr/bin
|
2025-11-16 10:42:33 -05:00
|
|
|
COPY ./docker/entrypoint.sh /entrypoint.sh
|
|
|
|
|
|
|
|
|
|
# IO class default is "none"- 0, however busybox reject ionice `-c0 -n<something>`
|
|
|
|
|
# since priority has no meaning for no scheduler.
|
|
|
|
|
# Thus the entrypoint script below is necessary
|
|
|
|
|
ENV IONICE_CLASS=
|
|
|
|
|
ENV IONICE_PRIORITY=4
|
|
|
|
|
ENV NICE=0
|
2021-09-20 08:18:48 -04:00
|
|
|
|
2025-11-16 10:42:33 -05:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|