## Summary
Update how metrics server binds to a listener by using a known set of ports whenever the default address is used with the fallback to a random port in case all address are already in use. The default address changes at compile time in order to bind to a different default address when the final deliverable is a docker image.
Refactor ReadyServer tests.
Closes TUN-8737
Also update golang.org/x/net and google.golang.org/grpc to fix vulnerabilities,
although cloudflared is using them in a way that is not exposed to those risks
This change seeks to push an arm64 built image to dockerhub for arm users to run. This should spin cloudflared on arm machines without the warning
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
* Allow Dockerfile --build-args to override GOOS and GOARCH defaults
Allow Dockerfile --build-args to override GOOS and GOARCH defaults
Support building multi architecture binaries
remove default OS and ARCH to avoid tag confusion when compiling image through Makefile
Tag image with corrosponding OS and ARCH build variables
updating Makefile
Signed-off-by: Michael Fornaro <20387402+xUnholy@users.noreply.github.com>
* remove duplicate import on windows_service.go
Signed-off-by: Michael Fornaro <20387402+xUnholy@users.noreply.github.com>
* Enables module-mode in Docker to fix build
* Statically compile binary in Docker to fix missing dependency errors
* Ensure target OS is set to Linux for Docker builds
Use debian/distroless (glibc) as a base which in general gives
slightly higher performance than alpine (musl) while trading
off container size (about 10mb).
The build phase makes the assumption that any capnproto-files
are pre-processed before building in-docker.