diff --git a/Dockerfile b/Dockerfile index 6948512..d967d0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,9 @@ WORKDIR /godoor COPY go.mod go.sum ./ RUN go mod download && go mod verify - COPY . . +# fully static build (takes ~300s to build): ENV GOBUILDLDFLAGS="-linkmode 'external' -extldflags '-static'" RUN go build -tags netgo . diff --git a/godoor.go b/godoor.go index 888c358..5eb59e2 100644 --- a/godoor.go +++ b/godoor.go @@ -235,7 +235,7 @@ func setup(ctx context.Context) { } func listenSig1(ctx context.Context, wiegand Wiegand) { - usrSig := make(chan os.Signal) + usrSig := make(chan os.Signal, 1) signal.Notify(usrSig, syscall.SIGUSR1) for {