Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

docker nodejs

# getting a copy of ubuntu for docker
pull ubuntu

# run ubuntu image in interactive mode 
docker run -it ubuntu  

# run ubuntu image in interactive mode while mounting the terminal
# current working directory to ubuntu home folder
docker run -v ${PWD}:/home -it ubuntu

# run ubuntu image in interactive mode while mounting the terminal
# mounting an absolute path on my computer directory to ubuntu home folder
docker run -v /Users/codecaine/Desktop:/home -it ubuntu

# run ubuntu image in interactive mode while mounting the terminal
# mounting an absolute path on my computer directory to ubuntu home/data
# directory
docker run -v /Users/codecaine/Desktop:/home/data -it ubuntu

# run these two commands to be able to install packages with apt-get
apt-get -y update
apt-get -y curl

# installing python and nodejs with apt-get
apt-get -y python3.10 
apt-get -y install nodejs
Source by codefreelance.net #
 
PREVIOUS NEXT
Tagged: #docker #nodejs
ADD COMMENT
Topic
Name
5+3 =