Using Docker as the engine of the virtual environment makes the environment itself isolated, easily sharable, and also eventually ready-to-be-deployed given that it is still a Docker container.
This post is a summary of my research on building Go projects in a Docker container on CI (Gitlab, specifically). I found solving private dependencies quite hard (coming from a Node/.NET background) so that is the main reason I wrote this up. Please feel free to reach out if there are any issues or a submit pull request on the Docker image. Dep As dep is the best option for managing Go dependencies right now, the build will need to run dep ensure before building.
Docker is a powerful tool, however learning how to use it in the right way could take a long time especially with the rapidly growing ecosystem of containers which could be confusing, that is why I…