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:
parent
600617f9ba
commit
4ac3278ffb
9
.github/workflows/build-and-push-images.yml
vendored
9
.github/workflows/build-and-push-images.yml
vendored
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user