代码之家  ›  专栏  ›  技术社区  ›  Pavel Perevezencev

创建新的通用docker计算机时出错

  •  2
  • Pavel Perevezencev  · 技术社区  · 7 年前

    MacBook-Pro-Pavel:demo pavel$ docker-machine create --driver generic --generic-ssh-key ~/.ssh/id_rsa --generic-ip-address=5.63.154.209 regru
    Running pre-create checks...
    Creating machine...
    (regru) Importing SSH key...
    Waiting for machine to be running, this may take a few minutes...
    Detecting operating system of created instance...
    Waiting for SSH to be available...
    Detecting the provisioner...
    Provisioning with debian...
    Copying certs to the local machine directory...
    Copying certs to the remote machine...
    Setting Docker configuration on the remote daemon...
    Error creating machine: Error running provisioning: ssh command error:
    command : sudo systemctl -f start docker
    err     : exit status 1
    output  : Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
    

    具有驱动程序“virtualbox”的机器正常创建:

    MacBook-Pro-Pavel:~ pavel$ docker-machine ls
    NAME           ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
    regru          -        generic      Running   tcp://5.63.154.209:2376             Unknown       Unable to query docker version: Cannot connect to the docker engine endpoint
    swarm-node-0   -        virtualbox   Running   tcp://192.168.99.100:2376           v17.06.0-ce   
    swarm-node-1   -        virtualbox   Running   tcp://192.168.99.101:2376           v17.06.0-ce  
    

    systemctl status docker.service journalctl -xn here .

    我做错了什么?

    更新

    $ docker version
    Client:
     Version:      17.06.0-ce
     API version:  1.30
     Go version:   go1.8.3
     Git commit:   02c1d87
     Built:        Fri Jun 23 21:31:53 2017
     OS/Arch:      darwin/amd64
    
    Server:
     Version:      17.06.0-ce
     API version:  1.30 (minimum version 1.12)
     Go version:   go1.8.3
     Git commit:   02c1d87
     Built:        Fri Jun 23 21:51:55 2017
     OS/Arch:      linux/amd64
     Experimental: true
    
    1 回复  |  直到 7 年前
        1
  •  3
  •   MeIr    7 年前

    机会是,你做的每件事都是对的。 https://forums.docker.com/t/docker-machine-create-fails-on-digitalocean/34750

    解决方法是手动提供较旧的docker引擎:

    docker-machine create
    --driver amazonec2
    --engine-install-url=https://web.archive.org/web/20170623081500/https://get.docker.com
    

    将--引擎安装url添加到您的安装程序中,并查看其是否有效。