Merge pull request #4470 from AkihiroSuda/fix-static-plugin

BUILDING.md: fix description about static builds
This commit is contained in:
Wei Fu 2020-08-23 16:39:10 +08:00 committed by GitHub
commit c8523cc5bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,13 +117,13 @@ You can build static binaries by providing a few variables to `make`:
```sudo
make EXTRA_FLAGS="-buildmode pie" \
EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' \
EXTRA_LDFLAGS='-linkmode external -extldflags "-fno-PIC -static"' \
BUILDTAGS="netgo osusergo static_build"
```
> *Note*:
> - static build is discouraged
> - static containerd binary does not support loading plugins
> - static containerd binary does not support loading shared object plugins (`*.so`)
# Via Docker container