Bootstrap: docker
From: golang:1.12.3-alpine3.9
Stage: devel

%post
  # prep environment
  export PATH="/go/bin:/usr/local/go/bin:$PATH"
  export HOME="/root"
  cd /root
  touch hello

# Install binary into final image
Bootstrap: docker
From: alpine:3.9
Stage: final

# install binary from stage one
%files from devel
  /root/hello /bin/hello
