I have a Dockerfile that I used to compile the Go app using go build. I researched and indeed go build is recommended for production.
However I cannot find a proper answer as to why.
I understand go run creates a temporary file that and that cleans up on app termination.
But if I am using Docker, why is it bad to use go run instead of go build?