Can't remove a docker-machine

February 20, 2017 148 views
API Docker

I have a problem, probably of my own making. I started a docker machine on digital ocean with an API token, which I generated, but I didn't save the token, stupidly. The DigitalOcean UI doesn't seem to allow the displaying of this token, so I created a new one. But I can't seem to get rid of the docker machine I created on DigitalOcean, at least as far as my local docker-machine is concerned. I think this is because I'm no longer using the token that I used to start the machine. I've deleted the machine via DigitalOcean's UI, but I still get this on my machine:

Bills-New-iMac:~ bwright $ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
consul - digitalocean Running tcp://104.236.28.74:2376 v1.13.1
docker-app-machine - digitalocean Error Unknown GET https://api.digitalocean.com/v2/droplets/40085932: 401 Unable to authenticate you.
Bills-New-iMac:~ bwright $ docker-machine kill docker-app-machine
Killing "docker-app-machine"...
POST https://api.digitalocean.com/v2/droplets/40085932/actions: 401 Unable to authenticate you.
Bills-New-iMac:~ bwright $ docker-machine rm docker-app-machine
About to remove docker-app-machine
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): y
Error removing host "docker-app-machine": DELETE https://api.digitalocean.com/v2/account/keys/6462501: 401 Unable to authenticate you.
Bills-New-iMac:~ bwright $ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
consul - digitalocean Running tcp://104.236.28.74:2376 v1.13.1
docker-app-machine - digitalocean Error Unknown GET https://api.digitalocean.com/v2/droplets/40085932: 401 Unable to authenticate you.
Bills-New-iMac:~ bwright $

Any thoughts on how I can clean up the mess I made?

Be the first one to answer this question.