1
0
mirror of https://github.com/garraflavatra/docker-volume-s3-backup.git synced 2025-05-17 13:14:38 +00:00

Add ARM64 Builds (#15)

* Add ARM64 builds

* Move to a go-cron fork with arm64 support

* Use TARGETARCH directly in the script

* Use buildkit for docker build in readme
This commit is contained in:
Sam Weston 2022-07-14 06:16:28 +01:00 committed by GitHub
parent 600617f9ba
commit 4ac3278ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 2 deletions

View File

@ -21,6 +21,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to DockerHub
uses: docker/login-action@v1
with:
@ -35,3 +41,6 @@ jobs:
tags: ${{ github.repository }}:${{ matrix.postgres }}
build-args: |
ALPINE_VERSION=${{ matrix.alpine }}
platforms: |
linux/amd64
linux/arm64

View File

@ -1,5 +1,6 @@
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION}
ARG TARGETARCH
ADD src/install.sh install.sh
RUN sh install.sh && rm install.sh

View File

@ -50,7 +50,7 @@ docker exec <container name> sh restore.sh <timestamp>
## Build the image locally
`ALPINE_VERSION` determines Postgres version compatibility. See [`build-and-push-images.yml`](.github/workflows/build-and-push-images.yml) for the latest mapping.
```sh
docker build --build-arg ALPINE_VERSION=3.14
DOCKER_BUILDKIT=1 docker build --build-arg ALPINE_VERSION=3.14 .
```
## Run a simple test environment with Docker Compose
```sh

View File

@ -17,7 +17,10 @@ pip3 install awscli
# install go-cron
apk add curl
curl -L https://github.com/odise/go-cron/releases/download/v0.0.6/go-cron-linux.gz | zcat > /usr/local/bin/go-cron
curl -L https://github.com/ivoronin/go-cron/releases/download/v0.0.5/go-cron_0.0.5_linux_${TARGETARCH}.tar.gz -O
tar xvf go-cron_0.0.5_linux_${TARGETARCH}.tar.gz
rm go-cron_0.0.5_linux_${TARGETARCH}.tar.gz
mv go-cron /usr/local/bin/go-cron
chmod u+x /usr/local/bin/go-cron
apk del curl