fix: correctly set image labels build time

This commit is contained in:
surtur 2020-06-02 21:43:23 +02:00
parent 9d1782065f
commit 6f77f7133c
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

10
hooks/build Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# as per https://github.com/rossf7/label-schema-automated-build
# $IMAGE_NAME var is injected into the build so the tag is correct.
echo "Build hook running"
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
-t $IMAGE_NAME .