1
0
mirror of https://github.com/docker/cli.git synced 2026-01-15 07:40:57 +03:00
Files
cli/components/engine/docs/sources/installation/mac.rst
Solomon Hykes d1c858864a docs: instead of a top-level 'upgrading docker' doc, add an 'upgrades' paragraph to each installation target
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: dd786eefbbf286ca57b52374a6905c1ac8b8bd60
Component: engine
2014-01-20 23:11:30 +00:00

2.0 KiB

title
Installing Docker on a Mac
description
Installing Docker on a Mac
keywords
Docker, Docker documentation, virtualbox, git, ssh

Installing Docker on a Mac

This guide explains how to install a full Docker setup on your Mac, using Virtualbox and Vagrant.

Install Vagrant and Virtualbox

  1. Install virtualbox from https://www.virtualbox.org/ (or use your package manager)
  2. Install vagrant from http://www.vagrantup.com/ (or use your package manager)
  3. Install git if you had not installed it before, check if it is installed by running git in a terminal window

Spin it up

  1. Fetch the docker sources (this includes the Vagrantfile for machine setup).

    git clone https://github.com/dotcloud/docker.git
  2. Change directory to docker

    cd docker
  3. Run vagrant from the sources directory

    vagrant up

    Vagrant will:

    • Download the 'official' Precise64 base ubuntu virtual machine image from vagrantup.com
    • Boot this image in virtualbox
    • Follow official ubuntu_linux installation path

    You now have a Ubuntu Virtual Machine running with docker pre-installed.

Connect

To access the VM and use Docker, Run vagrant ssh from the same directory as where you ran vagrant up. Vagrant will connect you to the correct VM.

vagrant ssh

Upgrades

Since your local VM is based on Ubuntu, you can upgrade docker by logging in to the VM and calling apt-get:

# Log into the VM
vagrant ssh

# update your sources list
sudo apt-get update

# install the latest
sudo apt-get install lxc-docker

Run

Now you are in the VM, run docker

sudo docker

Continue with the hello_world example.