Use -tags netgo flag for go build to fix DNS resolution

This commit is contained in:
sid palas
2023-02-03 16:29:28 -05:00
parent 68e0caa95f
commit 732ee2f648
3 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ COPY . .
# Add flags to statically link binary
RUN go build \
-ldflags="-linkmode external -extldflags -static" \
-tags netgo \
-o api-golang
# Use separate stage for deployable image