diff --git a/hack/docker_build.sh b/hack/docker_build.sh index 1bc1114f0..0d0d1ecb2 100755 --- a/hack/docker_build.sh +++ b/hack/docker_build.sh @@ -20,13 +20,18 @@ tag_for_branch() { REPO=${REPO:-kubespheredev} TAG=$(tag_for_branch $1) -docker build -f build/ks-apiserver/Dockerfile -t $REPO/ks-apiserver:$TAG . -docker build -f build/ks-controller-manager/Dockerfile -t $REPO/ks-controller-manager:$TAG . - # Push image to dockerhub, need to support multiple push cat ~/.docker/config.json | grep index.docker.io if [[ $? != 0 ]]; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin fi + +docker build -f build/ks-apiserver/Dockerfile -t $REPO/ks-apiserver:$TAG . docker push $REPO/ks-apiserver:$TAG +# print the full docker image path for your convience +docker images --digests | grep $REPO/ks-apiserver | grep $TAG | awk '{print $1":"$2"@"$3}' + +docker build -f build/ks-controller-manager/Dockerfile -t $REPO/ks-controller-manager:$TAG . docker push $REPO/ks-controller-manager:$TAG +# print the full docker image path for your convience +docker images --digests | grep $REPO/ks-controller-manager | grep $TAG | awk '{print $1":"$2"@"$3}'