Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.
like image 292
Rick Avatar asked Jun 16 '16 22:06

Rick


2 Answers

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
like image 83
Rick Avatar answered Sep 17 '22 23:09

Rick


I ran into the same problem today, in a debian machine. I'm updated with the command I used since docker-machine is now docker-compose

wget -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` sudo mv ./docker-compose-`uname -s`-`uname -m` /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose

like image 42
Ernest Avatar answered Sep 18 '22 23:09

Ernest