Installing Docker on Mac OS X (RPM)

Source: Internet
Author: User
Tags nginx server

Http://www.oschina.net/translate/installing-docker-on-mac-os-x?print installing Docker on Mac OS X

Note: Docker supports Mac OS X 10.6 "Snow Leopard" and the above versions.

The Docker engine uses the Linux kernel-specific features, so to make it run on OS X we need a lightweight virtual machine (VM). Use OS X's Docker client to control virtual Docker to build, run, and manage Docker containers.

To make the process a little simpler, we designed a help application called Boot2docker that can follow the virtual machine and run the Docker daemon.

Installation
    1. Download the latest version of Docker for OS X Installer.

    2. Run Setup, install the VirtualBox and Boot2docker management tools.

    3. Run the Boot2docker app under the application folder:

Or manually initialize the Boot2docker, open the terminal and run:

1      $ boot2docker init
2      $ boot2docker start
3      exportDOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375

Once you have initialized a virtual machine, you can control it with Boot2docker stop and Boot2docker start.

Update
    1. Download the latest version of Docker for OS X Installer

    2. Run Setup, update the VirtualBox and Boot2docker management tools.

    3. To update an existing virtual machine, open the terminal and run:

      1 $ boot2docker stop
      2 $ boot2docker download
      3 $ boot2docker start

Run Docker

Run a "Hello World" example on the terminal to test Docker. Start the virtual machine and then run:

1 $ docker run ubuntu echohello world

This should download the Ubuntu image and print Hello world.

Container Port Jump

The latest version of Boot2docker establishes a network adapter-only host that provides access to the container's ports.

If you run a container that has a public port,

1 $ docker run --rm-i -t -p 80:80 nginx

Then you should be able to access the Nginx server with an IP address:

1 $ boot2docker ip

Typically, this IP address is 192.168.59.103, but may also be modified by VirtualBox enabled DHCP.

More details

If you're curious, Boot2docker's default user name is Docker, and the password is tcuser.

The Boot2docker management tool provides a number of commands:

$./boot2dockerusage:./boot2docker [<options>]{help|init|up|ssh|save|down|poweroff|reset|restart|config| Status|info|ip|delete|download|version} [<args>]

More content in User Guide.

For more information or to report a problem, please visit boot2docker site.

This address: http://www.oschina.net/translate/installing-docker-on-mac-os-x

Original address: https://docs.docker.com/installation/mac/

All translations in this article are for learning and communication purposes only, please be sure to indicate the translator, source, and link to this article.
Our translation work in accordance with the CC agreement, if our work has violated your rights and interests, please contact us promptly

Installing Docker on Mac OS X (RPM)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.