Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sudo: docker-machine: command not found

who has ever tried following this tutorial about Docker Swarm?

https://docs.docker.com/get-started/part4/

There is a section called : Create a cluster. What I wanted to do was to create a couple of VMs using docker-machine. Since I use ubuntu16.0.4 so I used following commands to get VirtualBox.

sudo apt-get update sudo apt-get install virtualbox-5.2 

After I installed VirtualBox, typed a command like :

docker-machine create --driver virtualbox myvm1

But it says : sudo: docker-machine: command not found

So I typed another command to check if I have installed VirtualBox correctly.

sudo virtualbox version

This opens the Oracle VM VirtualBox Manager, which means I did install VirtualBox correctly , but not sure.

Could anyone help me with a proper solution? Any help would be appreciated.

like image 242
CHRIS LEE Avatar asked Nov 15 '17 07:11

CHRIS LEE


People also ask

What is docker machine command?

Docker Machine is a tool for provisioning and managing your Dockerized hosts (hosts with Docker Engine on them). Typically, you install Docker Machine on your local system. Docker Machine has its own command line client docker-machine and the Docker Engine client, docker.


1 Answers

You need to install Docker Machine first on your local machine. If you use Ubuntu, just use this snippet (Update the version from the Official Repository Releases if needed) :

$ curl -L https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && chmod +x /tmp/docker-machine && sudo cp /tmp/docker-machine /usr/local/bin/docker-machine 
like image 116
coturiv Avatar answered Sep 29 '22 20:09

coturiv