$ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/linux-{{tool-name}} .
FROM scratch
MAINTAINER Danielle Tomlinson <[email protected]>
# You'll need to update this to be wherever you keep your ca-certs.
ADD resources/ca-certificates.crt /etc/ssl/certs/
ADD build/linux-{{tool-name}} /{{tool-name}}
CMD ["/{{tool-name}}"]
This results in ~10mb images for your Golang binaries, rather than distributing a bunch of things you don't need.