Eval command does not exist in Windows.
The Docker for Windows tutorial step 6 says to run this command:
C:\Users\mary> eval "$(docker-machine env my-default)"
Is this a mistake in the tutorial or did I not install something correctly?
I can run this command just fine from Git Bash but I'm curious why the Docker tutorial says to run this command from the Windows command prompt.
Here is the link to the tutorial https://docs.docker.com/v1.8/installation/windows/#using-docker-from-windows-command-line-prompt-cmd-exe
You can only run it from a bash indeed.
(like the git bash: C:\path\to\PortableGit-2.6.3-64-bit\git-bash.exe
)
Or you can run it from a regular CMD
, without the eval
:
docker-machine env my-default
Run below commands to configure your shell/cmd terminal
docker-machine env --shell cmd my-default
FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd my-default') DO %i
After successfully running the above commands you can run any docker command from the shell/cmd terminal.
I use the cmder console emulator. For the most part, I followed the docker docs for setting up from the windows 10 command prompt, except for the eval statement. When I attempted to run the eval statement described in the docs, I was prompted to run a different command instead (below), and it successfully activated my machine. MYMACHINEHERE should be the name of the machine you will have already created in an earlier step.
@FOR /f "tokens=*" %i IN ('docker-machine env MYMACHINEHERE') DO @%i
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With