Rails, Docker: Host does not exist: “default”

前端 未结 4 1206
耶瑟儿~
耶瑟儿~ 2021-01-30 08:42

When I try to run docker-machine start default , I get Host does not exist: \"default\", I tried eval \"$(docker-machine env default)\", b

4条回答
  •  执念已碎
    2021-01-30 09:27

    Try simply to check what machine has been created (docker-machine ls):

    docker-machine ls
    

    Then you can pick one and try your commands with it.

    If there is none, you can create one first (docker-machine create).
    In the case of the OP:

    docker-machine create default
    

    Since the error message was:

    Cannot connect to the Docker daemon. Is the docker daemon running on this host?

    One of the answers of "Docker command can't connect to docker daemon" should work:

    sudo service docker restart
    

提交回复
热议问题