build mc from source, support arm/v7

This commit is contained in:
Frederik Ring 2021-07-01 15:16:39 +02:00
parent c33ebc0c70
commit 07befda44d
3 changed files with 9 additions and 7 deletions

View File

@ -48,7 +48,7 @@ jobs:
docker context create docker-volume-backup docker context create docker-volume-backup
docker buildx create docker-volume-backup --name docker-volume-backup --use docker buildx create docker-volume-backup --name docker-volume-backup --use
docker buildx inspect --bootstrap docker buildx inspect --bootstrap
docker buildx build --platform linux/arm64,linux/amd64 \ docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \
-t offen/docker-volume-backup:$CIRCLE_TAG \ -t offen/docker-volume-backup:$CIRCLE_TAG \
-t offen/docker-volume-backup:latest \ -t offen/docker-volume-backup:latest \
. --push . --push

View File

@ -1,5 +1,9 @@
# Copyright 2021 - Offen Authors <hioffen@posteo.de> # 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 FROM alpine:3.14
@ -9,10 +13,8 @@ RUN apk add --update ca-certificates docker openrc gnupg
RUN update-ca-certificates RUN update-ca-certificates
RUN rc-update add docker boot RUN rc-update add docker boot
ARG TARGETARCH=amd64 COPY --from=builder /go/bin/mc /usr/bin/mc
RUN wget https://dl.min.io/client/mc/release/linux-$TARGETARCH/mc && \ RUN mc --version
chmod +x mc && \
mv mc /usr/bin/mc
COPY src/backup.sh src/entrypoint.sh /root/ COPY src/backup.sh src/entrypoint.sh /root/
RUN chmod +x backup.sh && mv backup.sh /usr/bin/backup \ RUN chmod +x backup.sh && mv backup.sh /usr/bin/backup \

View File

@ -114,4 +114,4 @@ This image is heavily inspired by the `futurice/docker-volume-backup`. We decide
- This image makes use of the MinIO client `mc` instead of the full blown AWS CLI for uploading backups. - This image makes use of the MinIO client `mc` instead of the full blown AWS CLI for uploading backups.
- The original image proposed to handle backup rotation through AWS S3 lifecycle policies. This image adds the option to rotate old backups through the same script so this functionality can also be offered for non-AWS storage backends like MinIO. - The original image proposed to handle backup rotation through AWS S3 lifecycle policies. This image adds the option to rotate old backups through the same script so this functionality can also be offered for non-AWS storage backends like MinIO.
- InfluxDB specific functionality was removed. - InfluxDB specific functionality was removed.
- `arm64` Architecture is supported. - `arm64` and `arm/v7` architectures are supported.