Skip to content

Support arm64 arch #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ jobs:
steps:
- name: Check out the repo
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 Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
Expand All @@ -37,13 +43,15 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image slim version
uses: docker/build-push-action@v4
with:
platforms: linux/arm64,linux/amd64
file: ./DockerfileSlim
push: true
tags: ${{ steps.meta_slim.outputs.tags }}
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ ENV ARCHIVE_FILE ""
RUN echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk --no-cache add python3-dev libffi-dev gcc libc-dev py3-pip py3-cffi py3-cryptography ca-certificates bash

# https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3
RUN rm /usr/lib/python3.11/EXTERNALLY-MANAGED

WORKDIR /opt/grafana-backup-tool
ADD . /opt/grafana-backup-tool

Expand Down
2 changes: 2 additions & 0 deletions DockerfileSlim
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN chmod -R a+r /opt/grafana-backup-tool \
RUN echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk add --no-cache --virtual build-deps ${DEV_PACKAGES} \
&& apk add --no-cache ${PACKAGES} \
# https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3
&& rm /usr/lib/python3.11/EXTERNALLY-MANAGED \
&& pip3 --no-cache-dir install . \
&& chown -R ${UID}:${GID} /opt/grafana-backup-tool \
&& apk del build-deps
Expand Down