Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add musl support #156

Closed
wants to merge 1 commit into from
Closed

Conversation

jrschumacher
Copy link

On alpine linux the installed version of node won't execute because its built with libc not musl.

Test

  1. Create a Dockerfile with the following steps and run docker build . you will see an error (screenshot).
  2. Make change and try again you will see error related invalid mirror or host, but then the second command will succeed.

**NOTE:

FROM alpine

# Setup
RUN apk update && \
    apk add ca-certificates fish curl

SHELL ["/usr/bin/fish", "--login", "-c"]

RUN curl -sL https://git.io/fisher | source && \
    fisher install jorgebucaran/fisher && \
    fisher install jorgebucaran/nvm.fish 

# Try install node
RUN nvm install 14 && nvm uninstall 14

# Set the unoffical builds mirror (supports musl) and install
# Version 16 does not support musl yet
RUN set -U nvm_mirror https://unofficial-builds.nodejs.org/download/release && \
    nvm install 14

image

Proof

image

@jorgebucaran jorgebucaran added the enhancement New feature or fix label Apr 29, 2021
@jorgebucaran
Copy link
Owner

I took a different approach by introducing nvm_arch that allows you to override the architecture parameter.

You should be able to get around this issue using the following recipe.

set nvm_mirror https://unofficial-builds.nodejs.org/download/release 
set nvm_arch_suffix x64-musl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants