mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-13 02:00:27 +01:00
8dfdd14527
* Added custom notification messages using text/template * Change notification template path and removed automatic newline trim * Added stats and changed structure of template params * Stat file hotfix * Embedded and fixed default notification templates Fix * Changed Output to LogOutput * Changed stats integer to unsigned * Bytes formatting in template func fix * Changed Archives to Storages * Removed unecessary sleep for pruning leeway * Set EndTime after pruning is completed * Added custom notifications documentation * Added 5s sleep in swarm test * Fixed documentation * Dockerfile copies all files in cmd/backup
24 lines
464 B
Docker
24 lines
464 B
Docker
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
FROM golang:1.17-alpine as builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY cmd/backup ./cmd/backup/
|
|
RUN go build -o backup cmd/backup/main.go
|
|
|
|
FROM alpine:3.15
|
|
|
|
WORKDIR /root
|
|
|
|
RUN apk add --update ca-certificates
|
|
|
|
COPY --from=builder /app/backup /usr/bin/backup
|
|
|
|
COPY ./entrypoint.sh /root/
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
ENTRYPOINT ["/root/entrypoint.sh"]
|