This is a simple guide on how to dockerize a golang binary in go1.11 with the vendor directories. By default go command will completely ignore vendor directories. But enabling the build using the vendor directory would speed up build a lot, especially when running inside Docker, as you do not need to fetch the dependencies anymore.
View the guide here:
Docker + go modules in go1.11. Contribute to alextanhongpin/go-modules development by creating an account on GitHub.
Another guide for gRPC: