git commit hash in dockerfile as label : <p>How to add git commit hash or any other dynamically inferred value in Dockerfile.</p>

<pre><code>LABEL vcs-ref=$(git rev-parse --short HEAD)
</code></pre>

<p>Something like this?</p>
