Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

NPM and docker installation and few commands

 NPM Installation

================

sudo Apt Install nodejs

sudo apt Install npm


nodejs -v

(version)

npm -v

(Version)


sudo apt install build-essential

(install build essentials in case you want to compile code from source -- just to be make sure)

An alternative to installing Node.js with apt is to use a tool called nvm, which stands for “Node.js Version Manager”. Rather than working at the operating system level, nvm works at the level of an independent directory within your home directory. This means that you can install multiple self-contained versions of Node.js without affecting the entire system.



Docker installation

====================

sudo apt install docker.io


docker -v 

(version)

Just in case apt fails to install docker there is an alternative to intall snap and install docker from there... also to know about snap google it 


sudo apt install snap

sudo snap install docker


[some handy commands] ...google for more 

docker run hello-world

docker images

docker ps -a

docker ps

docker build ./

docker run -tid -p 8083:90 --name "work" a334445434

docker exec -it kantil bash

docker cp /root/var/www/html/test.php work:/var/www/html

docker exec 74f86665f0fd ls

chmod -R 755 /var/www/html



This post first appeared on Computer Bapu, please read the originial post: here

Share the post

NPM and docker installation and few commands

×

Subscribe to Computer Bapu

Get updates delivered right to your inbox!

Thank you for your subscription

×