Use -tags netgo flag for go build to fix DNS resolution
This commit is contained in:
@ -16,6 +16,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
|
||||
|
||||
@ -16,6 +16,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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user