docker - Unexpected Random Bugs with Nextjs build running on Windows Server Edition - Stack Overflow

admin2025-04-27  4

I have a node application that I am hosting in Windows Server 2016 with pm2. It is running on the local office network of a small Enterprise.

At first my app experienced no issues, but eventually something pops up because of some third party software or anti-virus messing up the security settings leading to things like the app not being able to access media files from the directory where they're stored; or sending http requests irregularly. All of these are errors I can not reproduce on my machine and am fairly certain are an issue of the production environment.

I thought docker containers might help but I find that docker doesn't run on Windows Server Editions? Is there an easier solution to these issues or some standard practice that I don't know, being a greenhorn?

I have a node application that I am hosting in Windows Server 2016 with pm2. It is running on the local office network of a small Enterprise.

At first my app experienced no issues, but eventually something pops up because of some third party software or anti-virus messing up the security settings leading to things like the app not being able to access media files from the directory where they're stored; or sending http requests irregularly. All of these are errors I can not reproduce on my machine and am fairly certain are an issue of the production environment.

I thought docker containers might help but I find that docker doesn't run on Windows Server Editions? Is there an easier solution to these issues or some standard practice that I don't know, being a greenhorn?

Share Improve this question asked Jan 11 at 13:08 confumbitconfumbit 12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Docker does run on Windows servers using WSL2 which will basically setup a virtual machine for that. Although your trouble with volumes and anti-virus will no be solved.

My approach to that would be:

  1. Try to whitelist this application's folder or even the nodejs.exe. It runs as a process so whitelisting it would be a good options. You may also whitelist the folders which that application depends on.
  2. Containers are awesome so running a container instead of hosting that on a Windows server seems to be a reasonable approach but in order to do so you'd need docker server (over Windows + (WSL2 or HyperV)/Linux) to do so. You could use a docker compose for production for instance.

Hope that helps.

转载请注明原文地址:http://anycun.com/QandA/1745710357a91147.html