mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-04-15 13:45:35 +02:00
build mc from source, support arm/v7
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,5 +1,9 @@
|
||||
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
|
||||
# SPDX-License-Identifier: MIT
|
||||
# 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
|
||||
|
||||
FROM alpine:3.14
|
||||
|
||||
@@ -9,10 +13,8 @@ RUN apk add --update ca-certificates docker openrc gnupg
|
||||
RUN update-ca-certificates
|
||||
RUN rc-update add docker boot
|
||||
|
||||
ARG TARGETARCH=amd64
|
||||
RUN wget https://dl.min.io/client/mc/release/linux-$TARGETARCH/mc && \
|
||||
chmod +x mc && \
|
||||
mv mc /usr/bin/mc
|
||||
COPY --from=builder /go/bin/mc /usr/bin/mc
|
||||
RUN mc --version
|
||||
|
||||
COPY src/backup.sh src/entrypoint.sh /root/
|
||||
RUN chmod +x backup.sh && mv backup.sh /usr/bin/backup \
|
||||
|
||||
Reference in New Issue
Block a user