devcontainers / devcontainers/images

Ruby image nvm cannot install node 20

Open
#1,136 1 comment 0 reactions 1 assignee Claimed by @samruddhikhandale View on GitHub
Dominant language
Shell
Stars
2.1k
Forks
963
Avg merge
7h 48m
Merged PRs (30d)
11

Description

Hello!

I'm using the following Dockerfile:

```dockerfile
ARG RUBY_VERSION=3.3
ARG DISTRO_NAME=bullseye
FROM mcr.microsoft.com/devcontainers/ruby:1-$RUBY_VERSION-$DISTRO_NAME

ARG NODE_VERSION="20"
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
# . . .
```

And when I'm building the image, it crashes with
```
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install 20 2>&1":
0.987 Version '20' not found - try `nvm ls-remote` to browse available versions.
------
failed to solve: process "/bin/sh -c su vscode -c \"source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1\"" did not complete successfully: exit code: 3
```

In the same time, when I'm installing the same node's version locally, not from the Docker, it's done successfully.

Could anybody help me, please?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.