mirror of
https://github.com/ViViDboarder/docker-restic-cron.git
synced 2024-11-23 13:46:35 +00:00
Get target arch from docker build automatically
This commit is contained in:
parent
b710065f56
commit
7d0ff070ec
@ -1,20 +1,19 @@
|
|||||||
ARG REPO=library
|
ARG REPO=library
|
||||||
FROM ${REPO}/alpine:3.12
|
FROM ${REPO}/alpine:3.12
|
||||||
LABEL maintainer="ViViDboarder <vividboarder@gmail.com>"
|
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
RUN apk add --no-cache curl=~7 bash=~5
|
RUN apk add --no-cache curl=~7 bash=~5
|
||||||
|
|
||||||
ARG ARCH=amd64
|
|
||||||
|
|
||||||
ARG RCLONE_VERSION=v1.55.1
|
ARG RCLONE_VERSION=v1.55.1
|
||||||
|
|
||||||
COPY ./scripts/install_rclone.sh /scripts/
|
COPY ./scripts/install_rclone.sh /scripts/
|
||||||
RUN /scripts/install_rclone.sh "$RCLONE_VERSION" "$ARCH"
|
RUN /scripts/install_rclone.sh "$RCLONE_VERSION" "$TARGETARCH"
|
||||||
|
|
||||||
ARG RESTIC_VERSION=0.12.0
|
ARG RESTIC_VERSION=0.12.0
|
||||||
|
|
||||||
COPY ./scripts/install_restic.sh /scripts/
|
COPY ./scripts/install_restic.sh /scripts/
|
||||||
RUN /scripts/install_restic.sh "$RESTIC_VERSION" "$ARCH"
|
RUN /scripts/install_restic.sh "$RESTIC_VERSION" "$TARGETARCH"
|
||||||
|
|
||||||
# Set some default environment variables
|
# Set some default environment variables
|
||||||
ENV BACKUP_DEST="/backups"
|
ENV BACKUP_DEST="/backups"
|
||||||
|
2
Makefile
2
Makefile
@ -15,7 +15,7 @@ build-x86:
|
|||||||
|
|
||||||
.PHONY: build-arm
|
.PHONY: build-arm
|
||||||
build-arm:
|
build-arm:
|
||||||
docker build --build-arg REPO=arm32v7 --build-arg ARCH=arm -f ./Dockerfile -t $(DOCKER_TAG)-arm .
|
docker build --build-arg REPO=arm32v7 --build-arg TARGETARCH=arm -f ./Dockerfile -t $(DOCKER_TAG)-arm .
|
||||||
|
|
||||||
.PHONY: build-all
|
.PHONY: build-all
|
||||||
build-all: build-x86 build-arm
|
build-all: build-x86 build-arm
|
||||||
|
Loading…
Reference in New Issue
Block a user