mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-12-23 01:20:20 +01:00
1d45062100
* Move cron scheduling inside application * Make envvar a fallback and check for errors * Panic significantly less * propagate error out of runBackup * Add structured logging * FIx error propagation to exit * Enable the new scheduler by default * Review fixes * Added docs and better error propagation
22 lines
436 B
Docker
22 lines
436 B
Docker
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
FROM golang:1.21-alpine as builder
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN go mod download
|
|
WORKDIR /app/cmd/backup
|
|
RUN go build -o backup .
|
|
|
|
FROM alpine:3.19
|
|
|
|
WORKDIR /root
|
|
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
COPY --from=builder /app/cmd/backup/backup /usr/bin/backup
|
|
COPY --chmod=755 ./entrypoint.sh /root/
|
|
|
|
ENTRYPOINT ["/usr/bin/backup", "-foreground"]
|