mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[FIXED] Windows Docker Image
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
This commit is contained in:
@@ -4,10 +4,11 @@
|
||||
package logger
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows/svc/eventlog"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/sys/windows/svc/eventlog"
|
||||
)
|
||||
|
||||
// Skips testing if we do not have privledges to run this test.
|
||||
|
||||
Reference in New Issue
Block a user