Depending on your target architecture, you may wish to build your Go binaries with Docker to maintain a reproducible build, limit your build size, and minimize the attack vectors for your service. Using multistage Docker builds can help us to accomplish this task.
Consider the following simple package that logs a debug message to the screen:
package mainimport "go.uber.org/zap" ...