ci: Move Docker labels declaration inside Dockerfile
Created by: ggilmore
Follow up to https://github.com/sourcegraph/sourcegraph/pull/2806
This PR:
- Moves the
COMMIT_SHA
, etc. labels to be declared inside the Dockerfile via build args instead of in thedocker build ...
command. This is slightly cleaner, and makes it so that people don't need to remember the full metadata key (org.opencontainer...
) when modifying the build scripts. - Adds basic URL, docs metadata labels to the
sourcegraph/alpine
image. All images that usesourcegraph/alpine
as a base will inherit the value of these labels. cc @slimsag (The sourcegraph/alpine image will need to be re-deployed after this change)