#!/bin/bash

# See documentation for details:
# https://docs.docker.com/docker-hub/builds/advanced/

# Use $VERSION build environment variable or the Docker repository tag being built
version=${VERSION:-${DOCKER_TAG}}

docker build \
    --build-arg VERSION=$version \
    --build-arg VCS_REF=`git rev-parse --short HEAD` \
    --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
    -f $DOCKERFILE_PATH \
    -t $IMAGE_NAME .
