Docker’s catchphrase for its containers is compelling: "Build, Ship and Run Any App, Anywhere." Go already has some of those attributes built in, including cross-compilation and the production of single executable files without dependencies. Are there any reasons, then, for Go programmers to use containers to deploy code?
In this lesson, veteran developer Liz Rice outlines several advantages that containers can provide for Go programmers—such as how they help you restrict the resources that your code can access, and how you can use them to run and test your software locally with other components. You’ll then look at some cases where containers wouldn’t add any benefit at all.
As always, it’s important to use the right tool for the job, and containers can offer advantages for Go programmers in the right circumstances. This lesson provides some helpful guidelines.