2021-04-02 19:59:47 +08:00
|
|
|
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
|
2021-07-01 21:16:39 +08:00
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2023-08-10 22:03:59 +08:00
|
|
|
FROM golang:1.21-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-06-03 19:08:35 +08:00
|
|
|
FROM alpine:3.18
|
2021-04-02 19:59:47 +08:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
2022-02-26 23:45:29 +08:00
|
|
|
RUN apk add --no-cache ca-certificates
|
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
|
2023-04-29 02:06:57 +08:00
|
|
|
COPY --chmod=755 ./entrypoint.sh /root/
|
2021-04-02 19:59:47 +08:00
|
|
|
|
|
|
|
ENTRYPOINT ["/root/entrypoint.sh"]
|