Last update at :2024-05-18,Edit by888u
Node.js is a JavaScript running environment based on the Chrome V8 engine. It is a development platform that allows JavaScript to run on the server.
1. View available Node versions
Visit the Node mirror library address: https://hub.docker.com/_/node?tab=tags.
You can view other versions of Node through Sort by. The default is the latest version node:latest.
You can also find other versions you want in the drop-down list:
In addition, we can also use the docker search node command to view the available versions:
$ docker search node
2. Get the latest version of node image
Here we pull the official latest version of the image:
$ docker pull node:latest
3. View local mirror
Use the following command to see if node is installed
$ docker images
As you can see in the picture above, we have installed the latest version of the node image.
4. Run the container
After the installation is complete, we can use the following command to run the node container:
$ docker run -itd --name node-test node
Parameter description:
- –name node-test: Container name.
5. Installation successful
Finally go to check the node version the container is running on:
$ docker exec -it node-test /bin/bash root@6c5d265c68a6:/# node -v
Recommended site search: free asp space application, US host ranking, IP address search, jsp space, domain name space agency, domain name space registration, Ministry of Industry and Information Technology ICP registration number, cheap virtual host registration query Ministry of Industry and Information Technology, Hong Kong server,
发表评论