mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
The use of the `svc` API prevented the NATS Server to run as a container on both nanoserver and windowsservercore Docker images. An attempt was made to replace svc.Debug with normal server.Start() if detected to be interactive, however, that did not work. The fact of detecting if interactive or not already requires connecting to the service controller apparently. This change looks up for an environment variable (NATS_DOCKERIZED) and if set to "1", will not make use of the `svc` package. This environment variable will be set in the Docker image (in nats-docker/windows/nanoserver/Dockerfile and windowsservercore/Dockerfile). Resolves #543