Docker mac os x install install#
Install Docker Toolbox by double-clicking the package or by right-clicking and choosing “Open” from the pop-up menu. If you have VirtualBox running, you must shut it down before running the installer. To see this in practice, work through the exercises on this page.
When you start a container, the ports on a container map to ports on the VM. When you start the VM with docker-machine it is assigned an IP address. In OS X, the Docker host address is the address of the Linux VM. The VM runs completely from RAM, is a small ~24MB download, and boots in approximately 5s. The default is a lightweight Linux VM made specifically to run the Docker daemon on Mac OS X. In an OS X installation, the docker daemon is running inside a Linux VM called default. This means you can address ports on a Docker container using standard localhost addressing such as localhost:8000 or 0.0.0.0:8376. On a typical Linux installation, the Docker client, the Docker daemon, and any containers run directly on your localhost. The Docker host is the computer on which the containers run. In networking, localhost means your computer. In a Docker installation on Linux, your physical machine is both the localhost and the Docker host. Your Mac must be running OS X 10.8 “Mountain Lion” or newer to install the Docker Toolbox. This machine is a Linux VM that hosts Docker for you on your Mac. Instead, you must use docker-machine to create and attach to a virtual machine (VM).