README: use a golang:1.27 image in the Docker build example (#8698)

The README's Compilation with Docker section builds with golang:1.25,
but go.mod requires Go 1.26.0 or higher, and .go-version (used by CI)
pins 1.27.3. Use golang:1.27 so the example satisfies the declared
minimum.

Signed-off-by: yuwk <1729065730@qq.com>
This commit is contained in:
ump45nose
2026-10-24 16:12:11 +08:00
committed by GitHub
parent 6687e6362d
commit a5fdd11fcf

View File

@@ -79,7 +79,7 @@ setup a Go environment, you could build CoreDNS easily:
```
docker run --rm -i -t \
-v $PWD:/go/src/github.com/coredns/coredns -w /go/src/github.com/coredns/coredns \
golang:1.25 sh -c 'GOFLAGS="-buildvcs=false" make gen && GOFLAGS="-buildvcs=false" make'
golang:1.27 sh -c 'GOFLAGS="-buildvcs=false" make gen && GOFLAGS="-buildvcs=false" make'
```
The above command alone will have `coredns` binary generated.