Add support for armv6l (alpine based images) (#182)

GitHub CI log:
```
[linux/arm/v6 base 6/8] RUN yarn workspaces focus --all --production
204.6 ➤ YN0007: │ bcrypt@npm:5.1.0 must be built because it never has been before or the last one failed
204.6 ➤ YN0007: │ better-sqlite3@npm:8.2.0 must be built because it never has been before or the last one failed
...
[linux/arm/v7 base 6/8] RUN yarn workspaces focus --all --production
203.8 ➤ YN0007: │ bcrypt@npm:5.1.0 must be built because it never has been before or the last one failed
203.8 ➤ YN0007: │ better-sqlite3@npm:8.2.0 must be built because it never has been before or the last one failed
```

It seems that both armv6 and armv7 have the same issues with `bcrypt`
and `better-sqlite3` not being built. These packages are required to
build from source, luckily QEMU use armv7l for compiling.

Tested and working on RPi Zero W.

---------

Co-authored-by: Jed Fox <git@jedfox.com>
This commit is contained in:
intiplink
2023-04-08 01:37:10 +07:00
committed by GitHub
parent 7e88de182e
commit 063d468836
5 changed files with 23 additions and 13 deletions

View File

@@ -37,6 +37,10 @@ jobs:
strategy:
matrix:
os: [ubuntu, alpine]
arch: [amd64, arm64, arm/v7, arm/v6]
exclude:
- os: ubuntu
arch: arm/v6
steps:
- uses: actions/checkout@v3
@@ -76,7 +80,7 @@ jobs:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: docker/edge-${{ matrix.os }}.Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/${{ matrix.arch }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}

View File

@@ -27,6 +27,13 @@ jobs:
build:
name: Build Docker image
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu, alpine]
arch: [amd64, arm64, arm/v7, arm/v6]
exclude:
- os: ubuntu
arch: arm/v6
steps:
- uses: actions/checkout@v3
@@ -70,20 +77,11 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push standard image
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: .
push: true
file: docker/stable-ubuntu.Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
file: docker/stable-${{ matrix.os }}.Dockerfile
platforms: linux/${{ matrix.arch }}
tags: ${{ steps.meta.outputs.tags }}
- name: Build and push Alpine image
uses: docker/build-push-action@v4
with:
context: .
push: true
file: docker/stable-alpine.Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.alpine-meta.outputs.tags }}

View File

@@ -4,6 +4,7 @@ WORKDIR /app
ADD .yarn ./.yarn
ADD yarn.lock package.json .yarnrc.yml ./
RUN yarn workspaces focus --all --production
RUN if [ "$(uname -m)" = "armv7l" ]; then npm install bcrypt better-sqlite3 --build-from-source; fi
RUN mkdir /public
ADD "https://api.github.com/repos/actualbudget/actual/actions/artifacts?name=actual-web&per_page=100" /tmp/artifacts.json

View File

@@ -4,6 +4,7 @@ WORKDIR /app
ADD .yarn ./.yarn
ADD yarn.lock package.json .yarnrc.yml ./
RUN yarn workspaces focus --all --production
RUN if [ "$(uname -m)" = "armv7l" ]; then npm install bcrypt better-sqlite3 --build-from-source; fi
FROM alpine:3.17 as prod
RUN apk add --no-cache nodejs tini

View File

@@ -0,0 +1,6 @@
---
category: Features
authors: [intiplink]
---
Add support for armv6l (Alpine-based images only)