Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make gcloud-auth-docker fails on Windows #49

Closed
markmandel opened this issue Jan 7, 2018 · 3 comments
Closed

make gcloud-auth-docker fails on Windows #49

markmandel opened this issue Jan 7, 2018 · 3 comments
Assignees
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/bug These are bugs.
Milestone

Comments

@markmandel
Copy link
Member

Top level bug: #47

markmandel@DESKTOP-BDM5UCP:/c/Users/Mark/Documents/workspace/agon/build$ make gcloud-auth-docker
mkdir -p /c/Users/Mark/Documents/workspace/agon/build//.kube
mkdir -p /c/Users/Mark/Documents/workspace/agon/build//.config/gcloud
sudo rm -rf /tmp/gcloud-auth-docker
mkdir -p /tmp/gcloud-auth-docker
cp ~/.dockercfg /tmp/gcloud-auth-docker
cp: cannot stat '/home/markmandel/.dockercfg': No such file or directory
Makefile:222: recipe for target 'gcloud-auth-docker' failed
make: [gcloud-auth-docker] Error 1 (ignored)
docker run --rm -v /c/Users/Mark/Documents/workspace/agon/build//.config/gcloud:/root/.config/gcloud -v ~/.kube:/root/.kube -v /c/Users/Mark/Documents/workspace/agon:/go/src/github.com/agonio/agon -v /tmp/gcloud-auth-docker:/root --entrypoint="gcloud" agon-build:6c2ef6cd74 docker --authorize-only
Short-lived access for ['gcr.io', 'us.gcr.io', 'eu.gcr.io', 'asia.gcr.io', 'l.gcr.io', 'launcher.gcr.io', 'us-mirror.gcr.io', 'eu-mirror.gcr.io', 'asia-mirror.gcr.io', 'mirror.gcr.io', 'k8s.gcr.io'] configured.
sudo mv /tmp/gcloud-auth-docker/.dockercfg ~/
mv: cannot stat '/tmp/gcloud-auth-docker/.dockercfg': No such file or directory
Makefile:222: recipe for target 'gcloud-auth-docker' failed
make: *** [gcloud-auth-docker] Error 1

/cc @Kuqd

@markmandel markmandel added area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/bug These are bugs. labels Jan 7, 2018
@markmandel markmandel self-assigned this Jan 7, 2018
@cyriltovena
Copy link
Collaborator

cyriltovena commented Jan 7, 2018

yes the .dockercfg is there C:\Users\ctovena\.docker, I should be able to run win_userprofile="$(cmd.exe /c "<nul set /p=%UserProfile%" 2>/dev/null)" to get the path on WSL but so far I'm stuck cmd.exe not found and if I give the full path I get a not executable... pretty sure it's again a windows version too low.

you can use my branch to detect if you're on windows and convert to a variable the dockercfg path.

@markmandel
Copy link
Member Author

Got a fix incoming... one second. Issue was that you can't mount /tmp on windows - it has to be from /c (or pick a drive). I moved my tmp dir into the local build directory, and everything works as expected.

markmandel added a commit that referenced this issue Jan 7, 2018
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
@markmandel markmandel added this to the 0.1 milestone Jan 7, 2018
@cyriltovena
Copy link
Collaborator

cyriltovena commented Jan 7, 2018

I looked at it, you're right it wasn't my assumption, I've got to stop guessing and wait for my windows update :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. kind/bug These are bugs.
Projects
None yet
Development

No branches or pull requests

2 participants