build: add musl zig cross build image
This commit is contained in:
parent
63a16d0a27
commit
f337ed5638
2 changed files with 19 additions and 0 deletions
8
.github/workflows/docker.yaml
vendored
8
.github/workflows/docker.yaml
vendored
|
@ -49,6 +49,14 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository }}/nodejs-rust:lts-debian-zig
|
tags: ghcr.io/${{ github.repository }}/nodejs-rust:lts-debian-zig
|
||||||
|
|
||||||
|
- name: Build and push alpine with zig
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
file: alpine-zig.Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.repository }}/nodejs-rust:lts-alpine-zig
|
||||||
|
|
||||||
build_image_arm:
|
build_image_arm:
|
||||||
name: Build Node.js arm images
|
name: Build Node.js arm images
|
||||||
strategy:
|
strategy:
|
||||||
|
|
11
alpine-zig.Dockerfile
Normal file
11
alpine-zig.Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||||
|
|
||||||
|
ARG ZIG_VERSION=0.9.0
|
||||||
|
|
||||||
|
RUN apk add xz && \
|
||||||
|
rustup target add x86_64-unknown-linux-gnu && \
|
||||||
|
wget https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \
|
||||||
|
tar -xvf zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \
|
||||||
|
mv zig-linux-x86_64-${ZIG_VERSION} /usr/local/zig && \
|
||||||
|
ln -sf /usr/local/zig/zig /usr/local/bin/zig && \
|
||||||
|
rm zig-linux-x86_64-${ZIG_VERSION}.tar.xz
|
Loading…
Reference in a new issue