Skip to content

Ruby image nvm cannot install node 20 #1136

@yart

Description

@yart

Hello!

I'm using the following 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?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions