Last active
January 14, 2019 07:02
-
-
Save rossf7/664dc1eb02f514993c7215d37058965c to your computer and use it in GitHub Desktop.
Build hook for a Docker Hub automated build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 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 VCS_REF=`git rev-parse --short HEAD` \ | |
-t $IMAGE_NAME . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi ross:
How do I automatically trigger remote action after images are build successfully?I use pipeline of Bitbucket,it is ok if we can execute remote script?