docker-volume-backup/Dockerfile

24 lines
651 B
Docker
Raw Normal View History

2021-04-02 13:59:47 +02:00
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
2021-07-01 15:16:39 +02:00
# SPDX-License-Identifier: MPL-2.0
2021-08-19 11:08:36 +02:00
FROM golang:1.17-alpine as builder
2021-07-01 15:16:39 +02:00
ARG MC_VERSION=RELEASE.2021-06-13T17-48-22Z
RUN go install -ldflags "-X github.com/minio/mc/cmd.ReleaseTag=$MC_VERSION" github.com/minio/mc@$MC_VERSION
2021-04-02 13:59:47 +02:00
2021-06-28 20:25:21 +02:00
FROM alpine:3.14
2021-04-02 13:59:47 +02:00
WORKDIR /root
RUN apk add --update ca-certificates docker openrc gnupg
2021-07-01 08:18:04 +02:00
RUN update-ca-certificates
2021-04-02 13:59:47 +02:00
RUN rc-update add docker boot
2021-07-01 15:16:39 +02:00
COPY --from=builder /go/bin/mc /usr/bin/mc
RUN mc --version
2021-04-02 13:59:47 +02: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"]