I find the haproxy (alpine) Dockerfile a great example on how to tender to container file-size. It uses the syntax you're referring to, temporary build virtuals (should be multistage today I guess) and static linking:
https://github.com/docker-library/haproxy/blob/2d393f2b59824...