Search code examples
ubuntudocker-machineubuntu-16.04

docker-machine direct install on Ubuntu with curl getting permission denied with sudo


The instructions provided for installing docker-machine on Linux are way off for Ubuntu.

These are the incorrect instructions (found here):

$ curl -L https://github.com/docker/machine/releases/download/v0.7.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && \
$ chmod +x /usr/local/bin/docker-machine
  • You will have all kinds of permission denied errors while using sudo.
  • Once you hack your way around the sudo permission problems you will find your docker-machine file is empty after the install.

Solution

  • After a few hours of hacking around I found this is what is needed for installing docker-machine on Ubuntu (at least for the version I am running Lubuntu (16.04 LTS / Xenial Xerus):

    $ sudo wget -L https://github.com/docker/machine/releases/download/v0.8.0-rc1/docker-machine-`uname -s`-`uname -m`
    $ sudo mv docker-machine-`uname -s`-`uname -m` /usr/local/bin/docker-machine
    $ sudo chmod +x /usr/local/bin/docker-machine
    

    To test it has installed:

    $ docker-machine version