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

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

Bootstrap: docker
From: alpine:3.9 
Stage: final

%files from devel
/root/hello /bin/hello
%runscript
exec /bin/bash "$@"
%startscript
exec /bin/bash "$@"

