diff --git a/contact-center/Dockerfile b/contact-center/Dockerfile index 16410c0f..d23c49c7 100644 --- a/contact-center/Dockerfile +++ b/contact-center/Dockerfile @@ -1,6 +1,11 @@ FROM chatopera/java:1.0.0 MAINTAINER Hai Liang Wang +ARG VCS_REF + +LABEL org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-url="https://github.com/chatopera/cosin" + # Set timezone RUN apt-get update && \ apt-get install --no-install-recommends -y tzdata && \ diff --git a/contact-center/admin/build.sh b/contact-center/admin/build.sh index 18a63960..981e8681 100755 --- a/contact-center/admin/build.sh +++ b/contact-center/admin/build.sh @@ -13,8 +13,7 @@ PACKAGE_VERSION=1.0.0 # main [ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return -cd $appHome - set -x -docker build --force-rm=true --tag $imagename:$PACKAGE_VERSION . +cd $appHome +docker build --build-arg VCS_REF=`git rev-parse --short HEAD` --force-rm=true --tag $imagename:$PACKAGE_VERSION . docker tag $imagename:$PACKAGE_VERSION $imagename:develop