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