2024-03-15 11:42:22 +01:00
|
|
|
# Copyright 2022 - offen.software <hioffen@posteo.de>
|
2021-07-01 15:16:39 +02:00
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2024-02-16 20:52:45 +01:00
|
|
|
FROM golang:1.22-alpine as builder
|
2021-08-21 19:05:49 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
2022-08-18 08:52:09 +02:00
|
|
|
COPY . .
|
2021-11-23 08:04:48 +01:00
|
|
|
RUN go mod download
|
2022-02-13 10:52:19 +01:00
|
|
|
WORKDIR /app/cmd/backup
|
|
|
|
RUN go build -o backup .
|
2021-04-02 13:59:47 +02:00
|
|
|
|
2024-05-28 06:45:31 +02:00
|
|
|
FROM alpine:3.20
|
2021-04-02 13:59:47 +02:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
2024-02-21 17:44:24 +01:00
|
|
|
RUN apk add --no-cache ca-certificates && \
|
|
|
|
chmod a+rw /var/lock
|
2021-04-02 13:59:47 +02:00
|
|
|
|
2022-02-13 10:52:19 +01:00
|
|
|
COPY --from=builder /app/cmd/backup/backup /usr/bin/backup
|
2021-04-02 13:59:47 +02:00
|
|
|
|
2024-02-06 21:05:38 +01:00
|
|
|
ENTRYPOINT ["/usr/bin/backup", "-foreground"]
|