|
|
@@ -5,6 +5,8 @@ and set them — from the terminal, no web interface.
|
|
|
|
|
|
## Build and run
|
|
|
|
|
|
+On the machine you develop on:
|
|
|
+
|
|
|
```bash
|
|
|
go build
|
|
|
./schlundtech-dns --help
|
|
|
@@ -19,6 +21,23 @@ go run . --help
|
|
|
> Use `go build`, not `go build ./...`. With more than one package the `...`
|
|
|
> form only compiles and writes nothing.
|
|
|
|
|
|
+### Build for a Linux server
|
|
|
+
|
|
|
+No toolchain on the target needed — the binary is pure Go and statically
|
|
|
+linked, so it runs on any Linux without a libc:
|
|
|
+
|
|
|
+```bash
|
|
|
+CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" \
|
|
|
+ -o dist/schlundtech-dns-linux-amd64 .
|
|
|
+```
|
|
|
+
|
|
|
+`GOARCH=arm64` gives you `dist/schlundtech-dns-linux-arm64`. Copy the file over
|
|
|
+and run it:
|
|
|
+
|
|
|
+```bash
|
|
|
+./schlundtech-dns-linux-amd64 --help
|
|
|
+```
|
|
|
+
|
|
|
## Configure
|
|
|
|
|
|
Copy the example file and fill it in:
|