docker-archlinux-cdev/hooks/build
surtur 1fe2e823c4
All checks were successful
continuous-integration/drone/push Build is passing
updated Dockerfile to use ARGs
* set LABEL details at build time using ARGs
* added build hook that provides the subject functionality
* refactored Dockerfile
2020-03-04 20:11:45 +01:00

11 lines
337 B
Bash

#!/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 .