DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Containerization of a Node.js Service
  • Running Serverless Service as Serverful
  • Mastering Node.js: The Ultimate Guide
  • How To Use the Node Docker Official Image

Trending

  • Why Database Migrations Take Months and How to Speed Them Up
  • Immutable Secrets Management: A Zero-Trust Approach to Sensitive Data in Containers
  • FIPS 140-3: The Security Standard That Protects Our Federal Data
  • Beyond Simple Responses: Building Truly Conversational LLM Chatbots
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. How to Install NodeJS on Docker

How to Install NodeJS on Docker

Learn how to install NodeJS on a CentOS Docker image using this simple tutorial.

By 
Ajitesh Kumar user avatar
Ajitesh Kumar
·
Aug. 12, 15 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
62.3K Views

Join the DZone community and get the full member experience.

Join For Free

This article offers quick instructions on how to install NodeJS on a CentOS Docker image. The detailed instructions of installing NodeJS on Linux can be found on this page. Please feel free to comment/suggest if I failed to mention one or more important points

Following is the set of instructions:

  • Install Docker on your machine.
  • Pull the CentOS Docker image.
  • Create a container using the CentOS docker image. Use the following command:
    docker run -ti -dP --name centos -v /c/Users:/mnt/Users centos:latest /bin/bash
  • Start the Docker container and attach the image. Use the following command:
    # Starts the docker container
    docker start centos
    # Attach
    docker attach centos
  • Use the following command to install NodeJS:
    # Run as root on RHEL, CentOS, CloudLinux or Fedora:
    curl -sL https://rpm.nodesource.com/setup | bash -
    # Install as Root
    yum install -y nodejs

And that is it. Once the installation is done, type “npm” and you should find “npm” usage command instructions.

Docker (software) Node.js

Published at DZone with permission of Ajitesh Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Containerization of a Node.js Service
  • Running Serverless Service as Serverful
  • Mastering Node.js: The Ultimate Guide
  • How To Use the Node Docker Official Image

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: