go1.20+: Refuse to work if cgo is enabled

On go1.20+ it is no longer possible to directly copy a cgo-enabled
library into a docker container. For this reason, this commit adds a
flag to commands that automatically make them fail with an appropriate
message if cgo is enabled.
This commit is contained in:
Tom 2023-04-27 11:13:47 +02:00
parent 5e9795ad0c
commit 6362b2887b
9 changed files with 30 additions and 10 deletions

View file

@ -58,7 +58,7 @@ To bootstrap a new distillery instance, the `wdcli bootstrap` command can be use
First copy the executable onto the server, using a command similar as:
```bash
GOOS=linux GOARCH=amd64 go build -o wdcli ./cmd/wdcli && scp ./wdcli distillery.example.com:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o wdcli ./cmd/wdcli && scp ./wdcli distillery.example.com:
```
Next, access the server and run the `bootstrap` command: