hack: add nri_no_wasm build tag to static builds

Add the nri_no_wasm build tag to the BUILDFLAGS for static builds to
disable WASM plugins support in the NRI (Node Resource Interface)
component.

See: 1078130fa0/README.md (webassembly-support)

The NRI support is still minimal and disabling WASM plugins shaves off a
couple of MiB of the binary size.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-12-19 14:36:15 +01:00
parent ebf1c0d405
commit 7ddc5f609a

View File

@@ -88,7 +88,7 @@ if [ -z "$DOCKER_DEBUG" ]; then
LDFLAGS='-w'
fi
BUILDFLAGS=(${BUILDFLAGS} -tags "netgo osusergo static_build $DOCKER_BUILDTAGS")
BUILDFLAGS=(${BUILDFLAGS} -tags "netgo osusergo static_build nri_no_wasm $DOCKER_BUILDTAGS")
LDFLAGS_STATIC="-extldflags -static"
if [ "$(uname -s)" = 'FreeBSD' ]; then