A Docker image to prebuild Node.js native addons for Alpine Linux
8.5K
A Docker image to prebuild Node.js native addons for Alpine Linux
With GitHub Actions:
.github/workflows/prebuild.yml)name: Prebuild Package
on:
push:
tags:
- '*'
jobs:
prebuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm ci
- run: npm run build
- run: |
docker run --rm -v $(pwd):/usr/src/app wildwildangel/docker-prebuild-alpine npx prebuild -r napi -u ${{ secrets.GITHUB_TOKEN }}
package.json, add something like this into scripts:"install": "prebuild-install || node-gyp rebuild"
The actual command may differ, please consult with prebuild-install documentation for details.
prebuild-install to dependencies, and prebuild to devDependencies:npm i prebuild-install
npm i -D prebuild
Content type
Image
Digest
sha256:d8721da44…
Size
164.1 MB
Last updated
6 days ago
docker pull wildwildangel/docker-prebuild-alpine