napi-rs/Dockerfile.alpine
LongYinan 28257b45c1
feat(napi): support musl linux
drop future executor due to mutithreads bug.
2020-06-11 16:20:37 +08:00

13 lines
No EOL
531 B
Text

FROM rust:alpine
ENV RUSTFLAGS="-C target-feature=-crt-static"
RUN sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories && \
apk update && \
apk add nodejs yarn clang musl-dev llvm-dev curl && \
export NODE_VERSION=$(node -e "console.log(process.version)") && \
curl -fsSLO $(node -e "console.log(process.release.headersUrl)") && \
tar -xf "node-$NODE_VERSION-headers.tar.gz" && \
mv "node-$NODE_VERSION/include/node" include && \
rm -rf "node-$NODE_VERSION" && \
rm "node-$NODE_VERSION-headers.tar.gz"