Sfoglia il codice sorgente

Add information on how to build statically (#14594)

Fix #14576

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
tags/v1.15.0-dev
zeripath 3 anni fa
parent
commit
98827e99f6
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8
    0
      docs/content/doc/installation/from-source.en-us.md

+ 8
- 0
docs/content/doc/installation/from-source.en-us.md Vedi File

@@ -186,3 +186,11 @@ CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sq
```

Replace `CC`, `GOOS`, and `GOARCH` as appropriate for your architecture target.

You will sometimes need to build a static compiled image. To do this you will need to add:

```
LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="netgo osusergo $TAGS" make build
```

This can be combined with `CC`, `GOOS`, and `GOARCH` as above.

Loading…
Annulla
Salva