I used to install nodejs on Debian based container using the following in the Dockerfile:
RUN apt-get update -yq && apt-get upgrade -yq && apt-get install -yq curl git nano
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install nodejs -y
But I recently started getting the following message:
=> [base 3/7] RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
SCRIPT DEPRECATION WARNING
================================================================================
TO AVOID THIS WAIT MIGRATE THE SCRIPT Continuing in 60 seconds (press Ctrl-C to abort) ...
How do I fix it? How to correctly install nodejs?
2
Answers
According to nodesource/distributions GitHub repository
So, to install node.js you can use the new way as explainded here
Or you can use the official docker image https://hub.docker.com/_/node/
The notice from the script is
The instructions on github amount to a Dockerfile
RUN