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

docker-cloud installation fail #368

Closed
Downes opened this issue Jan 3, 2017 · 5 comments
Closed

docker-cloud installation fail #368

Downes opened this issue Jan 3, 2017 · 5 comments

Comments

@Downes
Copy link

Downes commented Jan 3, 2017

Expected behavior

C:\Users\downess>docker-cloud -v
docker-cloud 1.0.0
Actual behavior

C:\Users\downess>docker-cloud -v
Traceback (most recent call last):
File "c:\program files\anaconda3\lib\site-packages\dockercloud\api\auth.py", line 56, in load_from_file
out = p.communicate(input=HUB_INDEX)[0]
File "c:\program files\anaconda3\lib\subprocess.py", line 1072, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "c:\program files\anaconda3\lib\subprocess.py", line 1306, in _communicate
self._stdin_write(input)
File "c:\program files\anaconda3\lib\subprocess.py", line 1012, in _stdin_write
self.stdin.write(input)
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\program files\anaconda3\lib\runpy.py", line 184, in run_module_as_main
"main", mod_spec)
File "c:\program files\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files\Anaconda3\Scripts\docker-cloud.exe_main.py", line 5, in
File "c:\program files\anaconda3\lib\site-packages\dockercloudcli\cli.py", line 7, in
import dockercloud
File "c:\program files\anaconda3\lib\site-packages\dockercloud_init.py", line 31, in
basic_auth = auth.load_from_file("~/.docker/config.json")
File "c:\program files\anaconda3\lib\site-packages\dockercloud\api\auth.py", line 58, in load_from_file
raise dockercloud.AuthError('error getting credentials - err: exec: "%s": executable file not found in $PATH, out: ' % cmd) dockercloud.api.exceptions.AuthError: error getting credentials - err: exec: "docker-credential-wincred": executable file not found in $PATH, out:
Information about the Issue

Same error occurs using native Windows command prompt and the Kitematic PowerShell. If there is any other place this command should be run, it is not discoverable by me.
Steps to reproduce the behavior

On a Windows 10 install on Dell XPS (Core i7 quad)

Install Docker for Windows
Install Anaconda Python 
In command prompt, pip install docker-cloud or
In power shell docker run dockercloud/cli -h

Note that this sequence works fine and I can successfully log in:
C:\Users\downess> docker login
Username: user
Password:
Email: user@example.org
Login succeeded!

FYI:

C:\Users\downess>pip install -U docker-cloud
Requirement already up-to-date: docker-cloud in c:\program files\anaconda3\lib\site-packages
Requirement already up-to-date: requests<3,>=2.5.2 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: python-dockercloud<2,>=1.0.8 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: six<2,>=1.3.0 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: tabulate<1,>=0.7 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: future<1,>=0.15.0 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: ago<0.1,>=0.0.6 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: python-dateutil<3,>=2 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: PyYAML<4,>=3 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)
Requirement already up-to-date: websocket-client<1,>=0.32.0 in c:\program files\anaconda3\lib\site-packages (from docker-cloud)

@Downes Downes changed the title docker0-cloud installation fail docker-cloud installation fail Jan 3, 2017
@rn
Copy link
Contributor

rn commented Jan 7, 2017

@Downes thanks for the report.

There seem to be two different things in your report. One seem to be related to not being able to run dockercloud with Anaconda Python directly on the Windows host. For this it would be better to file an issue on the Docker Cloud CLI github project. FWIW I can successfully install docker-cloud via pip on my Windows system:

PS C:\Users\rneugeba> python --version
Python 2.7.12
PS C:\Users\rneugeba> docker-cloud -v
docker-cloud 1.0.7

So this might be an issue with Anaconda Python and/or docker-cloud.

The second thing was to run docker-cloud inside a container via docker run. That also seems to work fine (see below), provided you have Linux containers enabled.

I'm closing this issue as it doesn't seem to be related to the Docker for Windows application.

PS C:\Users\rneugeba> docker run -ti --rm dockercloud/cli -v
docker-cloud 1.0.7
PS C:\Users\rneugeba> docker run -ti --rm dockercloud/cli -h
usage: docker-cloud [-h] [-v]
                    {action,container,event,exec,login,node,nodecluster,repository,run,service,stack,tag,trigger,up}
                    ...

Docker Cloud CLI

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

Docker Cloud CLI commands:
  {action,container,event,exec,login,node,nodecluster,repository,run,service,stack,tag,trigger,up}
    action              Action-related operations
    container           Container-related operations
    event               Get real time Docker Cloud events
    exec                Run a command in a running container
    login               Please use "docker login" to log into Docker Cloud
    node                Node-related operations
    nodecluster         NodeCluster-related operations
    repository          Repository-related operations
    run                 Create and run a new service
    service             Service-related operations
    stack               Stack-related operations
    tag                 Tag-related operations
    trigger             Trigger-related operations
    up                  Create and deploy a stack

@rn rn closed this as completed Jan 7, 2017
@Downes
Copy link
Author

Downes commented Jan 7, 2017

As nearly as I can guess, it's a Python version thing, as I'm running 3.5.2 and you're running 2.7.12

Even though you've closed this, that did not make the errors go away for me, so I'll keep investigating.

@rn
Copy link
Contributor

rn commented Jan 7, 2017

@Downes you might be right that this is a Python version issue. As suggested, the Docker Cloud CLI github project would be a better place to report it.

@friism
Copy link

friism commented Jan 7, 2017

@Downes can you re-open on the Docker Cloud CLI project repo as Rolf suggested? https://github.com/docker/dockercloud-cli

People monitoring that repo can better help fix problems with the Cloud CLI.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants