diff --git a/Dockerfile b/Dockerfile index fe8eec10..a24a2ebf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.11.4 as builder +FROM golang:1.12.17 as builder ENV GO111MODULE=on @@ -8,7 +8,6 @@ WORKDIR /go/src/github.com/kubeflow/xgboost-operator COPY go.mod . COPY go.sum . -# COPY vendor/ vendor/ RUN go mod download diff --git a/build_image.sh b/build_image.sh index d4fe1c76..9f34ac2c 100755 --- a/build_image.sh +++ b/build_image.sh @@ -10,6 +10,7 @@ set -ex DOCKERFILE=$1 CONTEXT_DIR=$(dirname "$DOCKERFILE") IMAGE=$2 +TIMEOUT=30m cd $CONTEXT_DIR TAG=$(git describe --tags --always --dirty) @@ -17,5 +18,5 @@ TAG=$(git describe --tags --always --dirty) gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS} echo "Building ${IMAGE} using gcloud build" -gcloud builds submit --tag=${IMAGE}:${TAG} --project=${GCP_PROJECT} . +gcloud builds submit --tag=${IMAGE}:${TAG} --project=${GCP_PROJECT} --timeout=${TIMEOUT} . echo "Finished building ${IMAGE}:${TAG}"