简体   繁体   English

在Windows上安装Docker Cloud CLI

[英]installing docker cloud cli on windows

I am new to docker and setting up the environment in my windows 7 laptop to begin learning. 我是Docker的新手,并在Windows 7笔记本电脑中设置了环境以开始学习。 I installed docker through docker toolbox. 我通过docker工具箱安装了docker。 To install docker cloud cli, I followed the official documentation 要安装docker cloud cli,我遵循了官方文档

https://docs.docker.com/docker-cloud/installing-cli/#install https://docs.docker.com/docker-cloud/installing-cli/#install

I opened the quick start terminal and executed : 我打开了快速启动终端并执行:

       docker run dockercloud/cli -h

在此处输入图片说明

but while verifying the cloud version I am getting error 'bash: docker-cloud: command not found'. 但是在验证云版本时,出现错误“ bash:docker-cloud:找不到命令”。

Then I tried executing with pip command but didnt work. 然后我尝试用pip命令执行,但是没有用。

在此处输入图片说明

I have below tools installed : 我安装了以下工具:

     Python 2.7.13
     Docker version 17.05.0-ce, build 89658be
     docker-machine version 0.11.0, build 5b27455

and I have also verified that the docker engine is in running status. 并且我还验证了docker引擎处于运行状态。

Any help is appreciated. 任何帮助表示赞赏。

The docker-cloud commands is not installed as part of the Docker Toolbox installation. docker-cloud命令未作为Docker Toolbox安装的一部分安装。

The first command that you run is running a docker container that does run the Docker Cloud CLI. 您运行的第一个命令正在运行确实运行Docker Cloud CLI的Docker容器。 Running this container also is not a way to install the docker-cloud command directly to your windows host. 运行此容器也不是将docker-cloud命令直接安装到Windows主机的一种方法。 You can always invoke the same 'docker run dockercloud/cli' command to run the CLI containerized. 您始终可以调用相同的“ docker run dockercloud / cli”命令来运行容器化的CLI。

Similarly, the pip command is not installed as part of the Docker Toolbox installation. 同样,pip命令未作为Docker Toolbox安装的一部分安装。 pip is something I would expect to be installed if you install Python on your windows system. 如果在Windows系统上安装Python,我希望可以安装pip。

If you take a look at: https://docs.docker.com/docker-cloud/installing-cli/#install , the section for installing docker-cloud on windows does include this piece of advice: 如果您看一下: https : //docs.docker.com/docker-cloud/installing-cli/#install ,在Windows上安装docker-cloud的部分确实包含以下建议:

If you do not have Python or pip installed, you can either install Python or use this standalone pip installer . 如果您没有安装Python或pip ,则可以安装Python或使用此独立的pip安装程序 You do not need Python for our purposes, just pip . 您不需要Python就可以实现我们的目的,只需pip

You did mention that you have python installed, but you are still getting "command not found" when you try to run pip. 您确实提到已经安装了python,但是在尝试运行pip时仍会收到“找不到命令”。 That could simply be a problem with the $PATH in the quickstart terminal. 这可能只是快速入门终端中$PATH的问题。 I would recommend trying the pip command from a powershell window rather than the quickstart terminal. 我建议从Powershell窗口而不是quickstart终端尝试pip命令。 If you do have the pip command somewhere on your system, make sure that the location it is installed to does appear in your $PATH in the bash inside the quickstart terminal. 如果您的系统上确实有pip命令,请确保该命令的安装位置确实出现在快速入门终端内bash中的$PATH中。

Once you have pip installed, and in your $PATH , you should be able to run the pip install docker-cloud command. 一旦安装了pip并在$PATH ,您应该能够运行pip install docker-cloud命令。

It would also be a good idea to make sure that the directory holding the installed docker-cloud binary will also appear in your $PATH inside the quickstart terminal. 确保包含已安装的docker-cloud二进制文件的目录也将出现在quickstart终端的$PATH也是一个好主意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM