简体   繁体   中英

docker machine vs docker for mac

I have installed docker for mac on my machine. I have pulled a repo from the docker hub, the docker run command includes the docker-machine ip parameter for which I get an error, Error: No machine name(s) specified and no "default" machine exist. Could someone elaborate the difference between docker machine and docker for mac.

If you have Docker for Mac running on your machine, you don't need Docker Machine. Using Docker Machine (usually through Docker Toolbox ) to run locally only if you have an older Mac version that isn't supported, which isn't the case here, or a Windows machine without Windows 10 pro.

The only other case you need Docker Machine is for controlling remote machines or setting up multiple nodes locally.

In my Opinion:

Docker for Mac:

  1. Reliably binds containers to 127.1, unlike Vms on Virtualbox
  2. Portainer works much more reliably with this
  3. Has Kubertenes support

Docker Machine (aka Docker Toolbox w/VirtualBox):

  1. Really meant to be used on older version of MacOs, on older hardware
  2. Requires installing BOTH Virtubox + Docker
  3. Vms bind to 192.168.99.100 IP, not necessarily to 127.1
  4. If you shutdown Kitematic, in some cases is also shuts down your docker-machine without asking you. Sooo annoying.

You need to create the machine first of all. Try running the following command from your terminal of choice:

docker-machine create testmachine

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM