docker-machine create with digitalocean driver and Ubuntu 16.04 x64 fails
I am attempting to create a docker machine on Digital Ocean, but with the 16.04 LTS instead of the default 15.10. The do-access-token file contains my token.
Here’s the script (create-do):
#!/usr/bin/env bash # Creates a digital-ocean server with Ubuntu 16.04 instead of the default if [ "$1" != "" ]; then echo "Creating: " $1 docker-machine \ create \ --driver digitalocean \ --digitalocean-access-token=`cat do-access-token` \ --digitalocean-image=ubuntu-16-04-x64 \ --digitalocean-ipv6=true \ $1 else echo "Must have server name!" fi
When I run the script like this:
$ ./create-do ps-server
It successfully allocates the machine at Digital Ocean, then craps out with this:
Creating: ps-server Running pre-create checks... Creating machine... (ps-server) Creating SSH key... (ps-server) Creating Digital Ocean droplet... (ps-server) Waiting for IP address to be assigned to the Droplet... 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: Something went wrong running an SSH command! command : sudo apt-get update err : exit status 100 output : Reading package lists... E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/
The machine is running, but I can’t get to it since the SSH key was apparently not set before things started going wrong.
Anyone seen this before and/or have a work-around?
2 Solutions collect form web for “docker-machine create with digitalocean driver and Ubuntu 16.04 x64 fails”
this worked for me:
docker-machine provision your-node
I’ve taken this solution from here: https://github.com/docker/machine/issues/3358
I hope this helps!
Update: May 21, 2016
Broken again with same error this morning. Tried 4 times, failed same way each time.
Update: May 20, 2016
This was, according do Digital Ocean’s support, due to an issue with their Ubuntu 16.04 image which has now been corrected and I have confirmed that this now works.
Related GitHub issue (not yet closed):