From 671fbd0af1e786f3e4ced1640d4ffb0359ebf076 Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Sun, 7 Jan 2018 08:33:12 -0800 Subject: [PATCH] `make gcloud-auth-docker` works on Windows Issue was that the code attempted to mount /tmp with Docker. On Windows, the mount path has to be from /c (or another root dir), otherwise it won't work. Doing the temporary work in a `tmp` directory under the `build` dir solved the issue. Closes #49 --- .gitignore | 3 ++- build/Makefile | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 10a921e8f7..0b2cbca1af 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ !.gitignore *.iml bin -*.o \ No newline at end of file +*.o +tmp \ No newline at end of file diff --git a/build/Makefile b/build/Makefile index 921bd4dab1..f623bb42cf 100644 --- a/build/Makefile +++ b/build/Makefile @@ -219,11 +219,11 @@ gcloud-auth-cluster: ensure-build-image # authenticate our docker configuration so that you can do a docker push directly # to the gcr.io repository gcloud-auth-docker: ensure-build-image - -sudo rm -rf /tmp/gcloud-auth-docker - mkdir -p /tmp/gcloud-auth-docker - -cp ~/.dockercfg /tmp/gcloud-auth-docker - docker run --rm $(common_mounts) -v /tmp/gcloud-auth-docker:/root --entrypoint="gcloud" $(build_tag) docker --authorize-only - sudo mv /tmp/gcloud-auth-docker/.dockercfg ~/ + -sudo rm -rf $(build_path)/tmp + mkdir -p $(build_path)/tmp/gcloud-auth-docker + -cp ~/.dockercfg $(build_path)/tmp/gcloud-auth-docker + docker run --rm $(common_mounts) -v $(build_path)/tmp/gcloud-auth-docker:/root $(build_tag) gcloud docker --authorize-only + sudo mv $(build_path)/tmp/gcloud-auth-docker/.dockercfg ~/ sudo chown $(USER) ~/.dockercfg # Clean the gcloud configuration