Skip to content

Commit

Permalink
Update gcloud docker commands in build_docker.sh (#7078)
Browse files Browse the repository at this point in the history
* Update gcloud docker commands in build_docker.sh

"gcloud docker" is no longer supported for the latest docker client versions

* Add instructions to the docker build script
  • Loading branch information
droazen authored Feb 16, 2021
1 parent 43602f5 commit ae06fb7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions build_docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env bash
#
# Build (and optionally push) a GATK docker image.
#
# If you are pushing an image to our release repositories, be sure that you've followed
# the setup instructions here:
# https://github.com/broadinstitute/gatk/wiki/How-to-release-GATK4#setup_docker
# and here:
# https://github.com/broadinstitute/gatk/wiki/How-to-release-GATK4#setup_gcloud
#

# Have script stop if there is an error
set -e
Expand Down Expand Up @@ -151,18 +160,18 @@ if [ -n "${IS_PUSH}" ]; then
echo "Pushing to ${REPO_PRJ}"
docker push ${REPO_PRJ}:${GITHUB_TAG}

echo "Pushing to ${GCR_REPO}"
echo "Pushing to ${GCR_REPO} (if this fails, run \"gcloud auth configure-docker\" and try again)"
docker tag ${REPO_PRJ}:${GITHUB_TAG} ${GCR_REPO}:${GITHUB_TAG}
gcloud docker -- push ${GCR_REPO}:${GITHUB_TAG}
docker push ${GCR_REPO}:${GITHUB_TAG}

if [ -z "${IS_NOT_LATEST}" ] && [ -z "${IS_HASH}" ] ; then
echo "Updating latest tag in ${REPO_PRJ}"
docker tag ${REPO_PRJ}:${GITHUB_TAG} ${REPO_PRJ}:latest
docker push ${REPO_PRJ}:latest

echo "Updating latest tag in ${GCR_REPO}"
echo "Updating latest tag in ${GCR_REPO} (if this fails, run \"gcloud auth configure-docker\" and try again)"
docker tag ${GCR_REPO}:${GITHUB_TAG} ${GCR_REPO}:latest
gcloud docker -- push ${GCR_REPO}:latest
docker push ${GCR_REPO}:latest
fi

else
Expand Down

0 comments on commit ae06fb7

Please sign in to comment.