Skip to content

Feature: Golang + Alpine Linux

Alexander Bartolomey requested to merge feature/golang-alpine into master

The default Docker container for golang carries a version of Debian Stretch. This currently weights around 700MB for tooling which is mostly unused.

But since our Go app wasn't explicitly build prior to this branch, we need to build it with all dependencies in mind.

We then switched to a two-stage build process to build our app in a fully functioning Debian container and move the executable (and required files) to the Alpine image afterwards. This brings a reduction in file size from previous 700MB to about 40MB which is much more preferable.

We also moved to Golang 1.12, which is optional, but preferred.

Merge request reports