Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

docker-machine: adding an existing docker host to docker machine (mac osx) #4621

Open
programingnotes opened this issue Dec 10, 2018 · 1 comment

Comments

@programingnotes
Copy link

programingnotes commented Dec 10, 2018

Given that your docs start that If docker is not running on the host, it is installed automatically, the expectation is that running the command:

docker-machine create \
  --driver generic \
  --generic-ip-address=xxx.xxx.xxx.xxx \
  --generic-ssh-key path_to_ssh_key \
  --generic-ssh-user dockermachineuser \
  somerandomhost

on a host already running docker will not result in an error indicating that docker-machine was attempting to install docker as the error below shows:

Running pre-create checks...
Creating machine...
(somerandomhost) 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 ubuntu(systemd)...
Installing Docker...
Error creating machine: Error running provisioning: error installing docker:

and no further insights/error message provided by docker-machine.

A 2nd attempt results in this error:

Running pre-create checks...
Creating machine...
(somerandomhost) 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 ubuntu(systemd)...
Error creating machine: Error running provisioning: Error running "DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y  curl": ssh command error:
command : DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y  curl
err     : exit status 255
output  : 

Yet, I successfully run DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y curl on the host in question as the result below shows:

user@somerandomhost:~$ DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y  curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version (7.58.0-2ubuntu3.5).
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Please see related issues:

  • LOADS of good points made in #1221 but seems it wasn't resolved
  • This is marked resolved but it really isn't #3212
  • #4045
@karpulix
Copy link

Maybe, container-selinux wasn't installed on a remote machine or you had other trouble.
I recommend use --debug or -D for show verbose log.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants