DEV Community

Henrique Holtz
Henrique Holtz

Posted on • Updated on

How to execute Windows container with NodeJs

Hi dear, in this article we'll see how to execute Windows container with NodeJs

Note: For now, don't exists any official docker image with NodeJs to Windows container. You can confire at the official repository on dockerhub: https://hub.docker.com/_/node/

Let's see one example to run Windows container with NodeJs, separated at:

Note: You can see the tags that are the versions of NodeJs, for example henriqueholtz/node-win:16.15.1 have the NodeJs on 16.15.1 version.

Let's run it!

In your terminal, run the command below to create the container with the name win-16-15-1

docker run -d -t --name=node-win-16-15-1 henriqueholtz/node-win:16.15.1
Enter fullscreen mode Exit fullscreen mode

After created, we can access the container by name with the command:

docker exec -it node-win-16-15-1 cmd
Enter fullscreen mode Exit fullscreen mode

Now we are into the container, and we can see the NodeJs version with the simple command:

node --version
Enter fullscreen mode Exit fullscreen mode

output of  raw `node --version` endraw  command

With this we can run another apps like ReactJs, NextJs and much more, on Windows container!

See How to run ReactJs on Windows container

Thanks for reading. See you in another post!

Top comments (0)