Skip to content

Commit 671fbd0

Browse files
committed
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 agones-dev#49
1 parent f12945a commit 671fbd0

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
!.gitignore
1717
*.iml
1818
bin
19-
*.o
19+
*.o
20+
tmp

build/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,11 @@ gcloud-auth-cluster: ensure-build-image
219219
# authenticate our docker configuration so that you can do a docker push directly
220220
# to the gcr.io repository
221221
gcloud-auth-docker: ensure-build-image
222-
-sudo rm -rf /tmp/gcloud-auth-docker
223-
mkdir -p /tmp/gcloud-auth-docker
224-
-cp ~/.dockercfg /tmp/gcloud-auth-docker
225-
docker run --rm $(common_mounts) -v /tmp/gcloud-auth-docker:/root --entrypoint="gcloud" $(build_tag) docker --authorize-only
226-
sudo mv /tmp/gcloud-auth-docker/.dockercfg ~/
222+
-sudo rm -rf $(build_path)/tmp
223+
mkdir -p $(build_path)/tmp/gcloud-auth-docker
224+
-cp ~/.dockercfg $(build_path)/tmp/gcloud-auth-docker
225+
docker run --rm $(common_mounts) -v $(build_path)/tmp/gcloud-auth-docker:/root $(build_tag) gcloud docker --authorize-only
226+
sudo mv $(build_path)/tmp/gcloud-auth-docker/.dockercfg ~/
227227
sudo chown $(USER) ~/.dockercfg
228228

229229
# Clean the gcloud configuration

0 commit comments

Comments
 (0)