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

Install nodejs specced in tool-versions in Dockerfile #4942

Closed
wants to merge 4 commits into from

Conversation

RobertJoonas
Copy link
Contributor

Changes

Follow-up to #4933.

We'll use nvm to install the same version of nodejs as specified in the .tool-versions file. Also, rather than always installing the latest version of NPM (as it was before #4933), nvm will install the one that's bundled with the specific nodejs version (the same happens via asdf install).

Copy link

github-actions bot commented Jan 6, 2025

Preview environment👷🏼‍♀️🏗️
PR-4942

@RobertJoonas RobertJoonas force-pushed the proper-fix-build-images branch from 13571c7 to 23baf4b Compare January 6, 2025 19:40
Comment on lines +27 to +30
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& export NVM_DIR="$HOME/.nvm" \
&& [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" \
&& nvm install ${NODE_VERSION}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not skip the middleman and wget the version we know we want directly from https://nodejs.org/dist/?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that all those distributions are incompatible with Alpine Linux as it's using musl libc. Musl-compatible builds have been requested before, but it looks like so far there are only unofficial ones available.

@RobertJoonas
Copy link
Contributor Author

Closing in favour of #4945

@RobertJoonas RobertJoonas deleted the proper-fix-build-images branch January 7, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants