Docker command error during connect: get http://2F2F.2Fpipe2Fdocker_ engine/v1.36/containers/json: open//.

Error during connect: get http://% 2F% 2F.% 2fpipe% 2fdocker_ engine/v1.36/containers/json: open //./pipe/docker_ Engine: the system cannot find the file specified. In the default configuration on windows, the docker client must be run upgraded to connect. This error may also indicate that the docker day is not running.
the error message is as follows:


1. Execute command: docker machine env default

2. Method 1: copy the displayed command for execution

after execution, execute docker PS and other commands, and you can use it normally
3. Method 2: only the last REM @ for/F "tokens = *"% I in ('docker machine env default ') do @% I The command is executed without REM, that is, @ for/F "tokens = *"% I in ('docker machine env default ') do @% I

after execution, the docker command can be used normally, and the environment variable needs to be set first for each new CMD window.
Note: when using method 2 in bat script, if you directly put for statement into bat script to run, an error will be reported. Change % I in the command to %% I . For details, please refer to my other article, bat script execution for error reporting

Read More: