Skip to content

Commit

Permalink
ADD hooks/build for automated Docker Hub builds
Browse files Browse the repository at this point in the history
  • Loading branch information
lwimmer committed Feb 22, 2019
1 parent 8f4dc9d commit a9f1a52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# File needs to be called /hooks/build relative to the Dockerfile.
# $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 "GIT_VERSION=`git describe --abbrev=9 --dirty --always --tags --long 2> /dev/null`" \
-t $IMAGE_NAME .

0 comments on commit a9f1a52

Please sign in to comment.