Docker not working in Windows10

后端 未结 4 819
醉酒成梦
醉酒成梦 2021-01-04 05:52

I am using Docker version 1.12.2, build bb80604 and VirtualBox 5.1.6.

I was able to install Docker Toolbox correctly but I am

相关标签:
4条回答
  • 2021-01-04 06:15

    It looks like something bad happened to your docker-machine default machine.

    To recover, do the following:

    docker-machine rm -f default
    

    Next, open the virtualbox GUI and make sure that there isn't a VM that corresponds with that old "default" VM, just in case. If there is, manually delete it from there.

    Now, open the quickstart terminal again and it should create a new "default" virtual machine for you.

    Alternatively, you can create it like this:

    docker-machine create -d virtualbox --virtualbox-memory 2048 default
    

    At that point, your sequence of commands should work as expected again.

    0 讨论(0)
  • 2021-01-04 06:20

    step 1: run: docker-machine rm -f default - (on your mac terminal or control panel)

    step 2: run: docker-machine create -d virtualbox --virtualbox-memory 2048 default

    It worked like miracle.

    0 讨论(0)
  • 2021-01-04 06:21

    You may need another couple of steps additional to what @programmerq mentioned.

    • Create empty text file: C:\Users\<user>\.docker\machine\machines\default\config.json
    • Stop VBoxHeadless.exe service from Windows task manager

    Try docker-machine rm -f default and docker-machine create -d virtualbox --virtualbox-memory 2048 default commands afterwards to remove/add default

    0 讨论(0)
  • 2021-01-04 06:29

    If you are a Windows Home user, you will not be able install the Docker for Windows Desktop edition, as it requires Hyper-V virtualization. This is supported only by Windows Professional and Enterprise editions.

    As the Docker for Windows Desktop edition requires Hyper-V virtualization, you will not be able to install it if you are a Windows Home user. It is only supported by Windows Professional and Enterprise editions.

    If you have installed Docker Toolbox and you are dealing with errors while trying to start the default machine you can create a new one by running:

    docker-machine create box
    

    the in order to see how to connect your Docker Client to the Docker Engine running on the virtual machine created run:

    docker-machine env box
    

    the command that you need to run in order to configure your shell will then appear:

    eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env box)
    

    Check that the installation is runnung correctly by running:

    docker run hello-world
    

    Then you just need to start your machine every time you need to use docker:

    docker-machine start box
    

    and follow the second and third steps above for the configuration.

    0 讨论(0)
提交回复
热议问题