Docker commands fails (in Windows)

前端 未结 25 2442
-上瘾入骨i
-上瘾入骨i 2020-12-23 02:26

I am trying to use Docker on a windows machine and is hit with every possible issue it seems. My latest one is this: My machine is running but I can\'t seem to interact with

25条回答
  •  既然无缘
    2020-12-23 02:48

    I had to deal with the same issue on Windows.

    To solve it:

    1. Create a docker machine (only if you have not got one)

      docker-machine create  default
      
    2. Get the ENV vars which the docker client needs in order to connect to the docker machine (server) [This you will need to do every time or set in your ENV vars]

      docker-machine.exe env default
      

      You can either install them manually or run one of the following depending on your shell environment (cmd, bash, power-shell)

      docker-machine env --shell=cmd # you need to run it manually
      docker-machine env --shell=bash > env-var-commands-tmp && . env-var-commands-tmp && rm env-var-commands-tmp
      docker-machine env --shell=powershell | Invoke-Expression
      

提交回复
热议问题