Sunday, February 23, 2025

ubuntu container

 1. Create an ubuntu container: 


docker run -d -p 10000:3000 -p 11000:4000  --name ub-react -v "C:\RajeshWorks\DockerVolumes\React\ReactCompleteApp:/rajesh" ubuntu:latest tail -F /dev/null


2. Execute the docker container: 


docker exec -it ub-react bash


3. Update apt-get: 


apt-get update


4. Install sudo: 


apt-get install sudo -y 


5. Install curl: 


sudo apt-get install curl  -y


6. Add PPA for latest node: 



curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - 


NOTE: This command may take some time but do not press ctrl+c.


NOTE: TO find the latest version, go to https://github.com/nodesource/distributions

On this page, find the "Installation instructions" section and find the "Using Ubuntu" under it. 

This section will give you the latest version of above curl command. 


7. Install latest node: 

apt-get install -y nodejs


8. Update and upgrade apt-get: 


sudo apt-get update

sudo apt-get upgrade -y


9. Install npm: 


sudo apt-get install -y npm


10. Update npm: 

npm cache clean -f 

sudo npm install -g npm 


11. Check the versions of npm and node: 


node --version   (v20.18.1)

npm --version    (11.0.0)


12: Install vim: 

apt-get install vim


13. cd rajesh (so that you can see and edit files)


No comments:

Post a Comment

ubuntu container

 1. Create an ubuntu container:  docker run -d -p 10000:3000 -p 11000:4000  --name ub-react -v "C:\RajeshWorks\DockerVolumes\React\Reac...