Docker commands fails (in Windows)

前端 未结 25 2427
-上瘾入骨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:40

    I created a new machine using the below command

    docker-machine create --driver=virtualbox vbox-test
    

    Then executed the command

    docker-machine env --shell=powershell | Invoke-Expression
    

    Got it Working...

    0 讨论(0)
  • 2020-12-23 02:41

    I had similar issue when I installed Docker CE for Windows Version 17.11.0-ce-rc4-win39 (14244) Channel: edge e557194 on Windows 10.

    In Command/cmd windows, when I tried to run commands docker ps, docker version, docker info, the I got error like “error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.34/version” every time.

    To resolved this issue,

    1. I made “Hyper-V” off (Unchecked) from “Turn Windows feature on or off”, which required the OS to be restarted.
    2. And after first restart, I made “Hyper-V” On (Checked), which again required the OS to be restarted.

    After second restart, above docker commands started working and giving proper output.

    So, turning Hyper-V off and then on resolved this issue for me.

    0 讨论(0)
  • 2020-12-23 02:45

    Windows 10 Professional For me the Docker service was running but Docker still needed to be 'started'. That is, I had the setting 'Start Docker when you log in' unchecked in the Docker tray icon.

    Prior to finding this out I had gone to the program folder Docker and clicked 'Docker for Windows'. After a short time the message 'Docker is running' was displayed.

    0 讨论(0)
  • 2020-12-23 02:45

    I was having similar issue. For me I hadn't logged in to docker from the status bar. What I did was to login to docker from status bar. Once I logged in I was able to run all the commands properly. Try logging in using your docker id and password maybe that will resolve your issue.

    0 讨论(0)
  • 2020-12-23 02:47

    I saw this error message after a weekend. My setup was fine before that. My config and connections looked correct. $docker-machine restart default fixed it for me on Windows 7

    0 讨论(0)
  • 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
      
    0 讨论(0)
提交回复
热议问题