From a3c3b7da5dd55ddda97798c5b60e05ccb47ddbf4 Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Thu, 2 Sep 2021 14:58:08 -0400 Subject: [PATCH] add a default nsswitch.conf file the go networking stack will hit dns first unless you configure it otherwise without this, grpc_health_probe can fail to hit localhost due to slow external dns Signed-off-by: Evan Cordell --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1ec97e5533..f2eb4c4d15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN go build ./cmd/zed-testserver/ FROM alpine:3.14.2 +RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf COPY --from=build /go/bin/grpc_health_probe /usr/local/bin/ COPY --from=build /go/src/app/spicedb /usr/local/bin/spicedb COPY --from=build /go/src/app/zed-testserver /usr/local/bin/zed-testserver