So gcc is needed to make test binaries, and I see in your Dockerfile that you delete it from a builddep dir. Use case: go test -i -c -o battery.test github.com/yaddayadda/pkg/battery The standard golang container works ok, b/c the tooling is installed, but ideally I'd like to use the trim'd alpine containers.