DOCKER for Windows-打开执行docker machine env的cmd [英] DOCKER for Windows - Open cmd executing docker machine env
问题描述
我正在使用Docker For Windows(不是Dokcer工具箱),并且它与HyperV一起运行。
I'm using Docker For Windows ( not Dokcer toolbox ) and it is running with HyperV.
因此,每次我打开一个新的CMD时,都需要运行 docker-machine env并根据命令响应为shell定义变量:
So, every time I open a new CMD, I need to run "docker-machine env" and define variables for shell following the command response :
REM Run this command to configure your shell:
REM @FOR /f "tokens=*" %i IN ('docker-machine env') DO @%i
我可以为执行此命令的开放CMD创建快捷方式吗?
Could i create a shortcut for open CMD executing this commands.
糟糕。我不想为更好的命令外壳安装插件或应用程序。
Obs. I wouldn´t like to install a plugin or app for better command shell..
如果有人有建议,谢谢! :)
If anybody has a suggestions, Thanks! :)
推荐答案
我不确定我是否理解您的问题。打开命令提示符时,不需要做任何特殊的事情,这并不是我的经验。 docker命令开箱即用。
I'm not exactly certain I understand your question. It hasn't been my experience that need to do anything special when I open a command prompt. The docker commands are available "out of the box".
这篇关于DOCKER for Windows-打开执行docker machine env的cmd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!