napi-rs/alpine.Dockerfile

24 lines
814 B
Text
Raw Permalink Normal View History

FROM node:18-alpine
ENV PATH="/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo/bin:$PATH" \
RUSTFLAGS="-C target-feature=-crt-static" \
2020-11-26 15:30:19 +09:00
CC="clang" \
CXX="clang++" \
GN_EXE=gn
2022-07-31 17:49:12 +09:00
RUN apk add --update --no-cache bash wget cmake musl-dev clang llvm build-base python3 && \
sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories && \
2022-06-14 15:35:22 +09:00
apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing \
rustup \
git \
gn \
tar \
2022-04-18 13:19:48 +09:00
ninja
RUN rustup-init -y && \
2022-06-14 15:35:22 +09:00
yarn global add pnpm lerna && \
rustup target add aarch64-unknown-linux-musl && \
wget https://github.com/napi-rs/napi-rs/releases/download/linux-musl-cross%4010/aarch64-linux-musl-cross.tgz && \
tar -xvf aarch64-linux-musl-cross.tgz && \
rm aarch64-linux-musl-cross.tgz