A native executable is a complete application compiled for a specific operating-system and processor platform. It runs without a separate language runtime, making it useful for small container images. section 4.4
A native executable matters when you package applications:
- Go can compile applications for Windows, Linux, Intel, or Arm. section 4.4
- The compiled output can be copied into a minimal final container image. section 4.4
- Linux binaries must be explicitly marked executable with chmod; this has no effect on Windows. section 4.4
Building a Go executable in Docker
A builder stage runs go build -o /server, and the final stage copies /server into a minimal image before starting it as the container command.



