Can't install docker – Permission denied?

I’m trying to install docker-machine following the guide.

$ curl -L https://github.com/docker/machine/releases/download/v0.8.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \
> chmod +x /usr/local/bin/docker-machine

Error:

  • Jenkins SCM Sync Configuration Plugin In Docker Won't Talk to Github
  • Docker $(pwd) and bash aliases
  • Is there any way to compile and statically link ruby libs for Docker?
  • how to restrict number of service replicas in docker to 1
  • How to use a python library that is constantly changing in a docker image or new container?
  • Docker can't install npm packages
  • bash: /usr/local/bin/docker-machine: Permission denied

    Why? How can resolve this?

    I’m on Xubuntu 16.04.

  • Docker container port issue
  • Transmission-daemon inside Docker container with OpenVPN/privateinternetaccess.com port forwarding [closed]
  • Something missing in configuration for publishing from VS to Docker on Ubuntu?
  • how to use libfaketime to setting system date
  • Best way to copy files from Docker volume on remote server to local host?
  • Curl request from docker container to host timeout
  • One Solution collect form web for “Can't install docker – Permission denied?”

    This is discussed in issue 652

    Either you chown that folder

    sudo chown -R $(whoami) /usr/local/bin
    

    Or (better), as in this PR

    Note: If you get a “Permission denied” error, your /usr/local/bin directory probably isn’t writable and you’ll need to install Compose as the superuser.
    Run sudo -i, then the two commands above, then exit.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.