linux – Windows 7上没有Docker命令
作者:互联网
所以我在Windows上使用Docker和boot2docker很长一段时间,一切正常.最近,它开始困扰我,为了运行docker命令,我必须启动Boot2Docker终端,并键入boot2docker ssh,并从虚拟机运行docker命令.我发现奇怪的是,在启动Boot2Docker终端后(没有ssh到vm),这是输出:
initializing...
Virtual machine boot2docker-vm already exists
starting...
Waiting for VM and Docker daemon to start...
.o
Started.
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\ca.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\cert.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\key.pem
To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH='C:\Users\user\.boot2docker\certs\boot2do cker-vm'
export DOCKER_TLS_VERIFY=1
IP address of docker VM:
192.168.59.103
setting environment variables ...
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\ca.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\cert.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\key.pem
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH='C:\\Users\\user\\.boot2docker\\certs\\bo ot2docker-vm'
export DOCKER_TLS_VERIFY=1
You can now use `docker` directly, or `boot2docker ssh` to log into the VM.
之后,我可以运行boo2docker.exe ssh,并从vm docker命令运行.但是没有ssh-ing:
$docker.exe
bash: docker.exe: command not found
我错过了什么吗?
解决方法:
同样的问题 – docker toolbox install不会将docker添加到路径中.
只需手动将docker.exe添加到您的路径中 – 我的程序文件已安装到docker工具箱中.
C:\Program Files\Docker Toolbox\
标签:docker,linux,windows-7,boot2docker 来源: https://codeday.me/bug/20190623/1272206.html