I recently upgraded Docker Desktop for Mac to version 2.2.0.0, and now when try to run a docker-machine command I am getting an error:
$ docker-machine --version docker-machine: command not found
Docker Machine used to be installed with Docker, but it appears in the latest docs that this is no longer the case. What is the replacement or do I need to install Docker Machine from somewhere else?
7 Answers
Docker machine has been removed from later versions of Docker Desktop. Your going to need the docker-toolbox package.
Read here for install and co existence of the packages.
2For Windows, if you have chocolatey installed, you follow the steps:
- open a command shell with "Run as Administrator" selected (I tested this on my work laptop).
- run "choco install docker-machine"
If you already have docker-desktop & want the docker-machine command, then brew install docker-machine does the trick.
My versions of the binaries in usr/local/bin/docker and usr/local/bin/docker-compose did not change, & the version of the docker client & server, but I got the docker-machine binary extra.
run unset ${!DOCKER_*} if you want to use docker-desktop.
The docker docs are a bit confusing because they seem to address the case where you have docker-machine first, not the case where you have desktop first.
1Docker machine is now merged into the docker command, So instead of using
docker-machine init Use
docker swarm init And instead of
docker-machine join Use
docker swarm join for more command just use this:
docker swarm --help 1You basically need to install Docker Machine first on your local machine. Reference :-
$ curl -L -s`-`uname -m` >/tmp/docker-machine && chmod +x /tmp/docker-machine && sudo cp /tmp/docker-machine /usr/local/bin/docker-machine 0Try and run this command on bash:
curl -L -s`-`uname -m` >/tmp/docker-machine && chmod +x /tmp/docker-machine && sudo cp /tmp/docker-machine /usr/local/bin/docker-machine Click here to know more about docker-machine installation
It worked for me.
1Did you try brew to install it as they removed docker-machine from v2.2.0?
brew install docker-machine