How to tag docker hub automated builds as git sha
Make a new executable file in hooks/
called post_push
with these contents to push another image with the latest git short hash as its tag:
#!/bin/bashSHORTHASH="$(git rev-parse --short HEAD)"docker tag $IMAGE_NAME $DOCKER_REPO:$SHORTHASHdocker push $DOCKER_REPO:$SHORTHASH