JavaScript Answers

How to install Node in Dockerfile?

Spread the love

To install Node in Dockerfile, we run curl and apt-get.

For instance, in our Dockerfile, we write

RUN curl -sL | bash - 
RUN apt-get install -y nodejs

to download the Node setup script with curl and run it with bash.

And then we run apt-get to install nodejs.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.