0

I'm using Docker For Windows ( not Dokcer toolbox ) and it is running with HyperV.

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

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! :)

Eduardo Fabricio
  • 2,151
  • 2
  • 25
  • 32

2 Answers2

0

Also, in my case I need to start in a specific folder.

Putting the command bellow in "Shorcut Properties > target" works perfectly for me :

%windir%\system32\cmd.exe /K "cd c:\docker & docker-machine env & @FOR /f "tokens=*" %i IN ('docker-machine env') DO @%i"

Eduardo Fabricio
  • 2,151
  • 2
  • 25
  • 32
0

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".

Chris Clements
  • 168
  • 1
  • 10