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
|
|
|
|
|
|
|
|
FROM golang:1.16-alpine as builder
|
|
|
|
ARG MC_VERSION=RELEASE.2021-06-13T17-48-22Z
|
|
|
|
RUN go install github.com/minio/mc@$MC_VERSION
|
2021-04-02 19:59:47 +08:00
|
|
|
|
2021-06-29 02:25:21 +08:00
|
|
|
FROM alpine:3.14
|
2021-04-02 19:59:47 +08:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
|
|
|
RUN apk add --update ca-certificates docker openrc gnupg
|
2021-07-01 14:18:04 +08:00
|
|
|
RUN update-ca-certificates
|
2021-04-02 19:59:47 +08:00
|
|
|
RUN rc-update add docker boot
|
|
|
|
|
2021-07-01 21:16:39 +08:00
|
|
|
COPY --from=builder /go/bin/mc /usr/bin/mc
|
|
|
|
RUN mc --version
|
2021-04-02 19:59:47 +08:00
|
|
|
|
|
|
|
COPY src/backup.sh src/entrypoint.sh /root/
|
|
|
|
RUN chmod +x backup.sh && mv backup.sh /usr/bin/backup \
|
|
|
|
&& chmod +x entrypoint.sh
|
|
|
|
|
|
|
|
ENTRYPOINT ["/root/entrypoint.sh"]
|