github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/docs/getstarted/step_one.md (about)

     1  <!--[metadata]>
     2  +++
     3  aliases = [
     4  "/mac/step_one/",
     5  "/windows/step_one/",
     6  "/linux/step_one/",
     7  ]
     8  title = "Install Docker and run hello-world"
     9  description = "Getting started with Docker"
    10  keywords = ["beginner, getting started, Docker, install"]
    11  [menu.main]
    12  identifier = "getstart_all_install"
    13  parent = "tutorial_getstart_menu"
    14  weight = 1
    15  +++
    16  <![end-metadata]-->
    17  
    18  # Install Docker
    19  
    20  - [Step 1: Get Docker](#step-1-get-docker)
    21  - [Step 2: Install Docker](#step-2-install-docker)
    22  - [Step 3: Verify your installation](#step-3-verify-your-installation)
    23  
    24  ## Step 1: Get Docker
    25  
    26  ### Docker for Mac
    27  
    28  Docker for Mac is our newest offering for the Mac. It runs as a native Mac application and uses <a href="https://github.com/mist64/xhyve/" target="_blank">xhyve</a> to virtualize the Docker Engine environment and Linux kernel-specific features for the Docker daemon.
    29  
    30  <a class="button" href="https://download.docker.com/mac/stable/Docker.dmg">Get Docker for Mac</a>
    31  
    32  **Requirements**
    33  
    34  - Mac must be a 2010 or newer model, with Intel's hardware support for memory management unit (MMU) virtualization; i.e., Extended Page Tables (EPT)
    35  
    36  - OS X 10.10.3 Yosemite or newer
    37  
    38  - At least 4GB of RAM
    39  
    40  - VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible with Docker for Mac). Docker for Mac will error out on install in this case. Uninstall the older version of VirtualBox and re-try the install.
    41  
    42  #### Docker Toolbox for the Mac
    43  
    44  If you have an earlier Mac that doesn't meet the Docker for Mac prerequisites, <a href="https://www.docker.com/products/docker-toolbox" target="_blank">get Docker Toolbox</a> for the Mac.
    45  
    46  See [Docker Toolbox Overview](/toolbox/overview.md) for help on installing Docker with Toolbox.
    47  
    48  ### Docker for Windows
    49  
    50  Docker for Windows is our newest offering for PCs. It runs as a native Windows application and uses Hyper-V to virtualize the Docker Engine environment and Linux kernel-specific features for the Docker daemon.
    51  
    52  <a class="button" href="https://download.docker.com/win/stable/InstallDocker.msi">Get Docker for Windows</a>
    53  
    54  **Requirements**
    55  
    56  * 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later). In the future we will support more versions of Windows 10.
    57  
    58  * The Hyper-V package must be enabled. The Docker for Windows installer will enable it for you, if needed. (This requires a reboot).
    59  
    60  #### Docker Toolbox for Windows
    61  
    62  If you have an earlier Windows system that doesn't meet the Docker for Windows prerequisites, <a href="https://www.docker.com/products/docker-toolbox" target="_blank">get Docker Toolbox</a>.
    63  
    64  See [Docker Toolbox Overview](/toolbox/overview.md) for help on installing Docker with Toolbox.
    65  
    66  ### Docker for Linux
    67  Docker Engine runs navitvely on Linux distributions.
    68  
    69  For full instructions on getting Docker for various Linux distributions, see [Install Docker Engine](/engine/installation/index.md).
    70  
    71  ## Step 2: Install Docker
    72  
    73  - **Docker for Mac** - Install instructions are at [Getting Started with Docker for Mac](https://docs.docker.com/docker-for-mac/).
    74  
    75  - **Docker for Windows** - Install instructions are at [Getting Started with Docker for Windows](https://docs.docker.com/docker-for-windows/).
    76  
    77  - **Docker Toolbox** - Install instructions are at [Docker Toolbox Overview](/toolbox/overview.md).
    78  
    79  - **Docker on Linux** - For a simple example of installing Docker on Ubuntu Linux so that you can work through this tutorial, see [Installing Docker on Ubuntu Linux (Example)](linux_install_help.md). Full install instructions for all flavors of Linux we support are at [Install Docker Engine](/engine/installation/index.md).
    80  
    81  ## Step 3: Verify your installation
    82  
    83  1. Open a command-line terminal, and run some Docker commands to verify that Docker is working as expected.
    84  
    85      Some good commands to try are `docker version` to check that you have the latest release installed and `docker ps` to see if you have any running containers. (Probably not, since you just started.)
    86  
    87  2. Type the `docker run hello-world` command and press RETURN.
    88  
    89      The command does some work for you, if everything runs well, the command's
    90      output looks like this:
    91  
    92          $ docker run hello-world
    93          Unable to find image 'hello-world:latest' locally
    94          latest: Pulling from library/hello-world
    95          535020c3e8ad: Pull complete
    96          af340544ed62: Pull complete
    97          Digest: sha256:a68868bfe696c00866942e8f5ca39e3e31b79c1e50feaee4ce5e28df2f051d5c
    98          Status: Downloaded newer image for hello-world:latest
    99  
   100          Hello from Docker.
   101          This message shows that your installation appears to be working correctly.
   102  
   103          To generate this message, Docker took the following steps:
   104          1. The Docker Engine CLI client contacted the Docker Engine daemon.
   105          2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub.
   106          3. The Docker Engine daemon created a new container from that image which runs the
   107             executable that produces the output you are currently reading.
   108          4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it
   109             to your terminal.
   110  
   111          To try something more ambitious, you can run an Ubuntu container with:
   112          $ docker run -it ubuntu bash
   113  
   114          Share images, automate workflows, and more with a free Docker Hub account:
   115          https://hub.docker.com
   116  
   117          For more examples and ideas, visit:
   118          https://docs.docker.com/userguide/
   119  
   120  3. Run `docker ps -a` to show all containers on the system.
   121  
   122          $ docker ps -a
   123  
   124          CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
   125          592376ff3eb8        hello-world         "/hello"            25 seconds ago      Exited (0) 24 seconds ago                       prickly_wozniak
   126  
   127      You should see your `hello-world` container listed in the output for the `docker ps -a` command.
   128  
   129      The command `docker ps` shows only currently running containers. Since `hello-world` already ran and exited, it wouldn't show up with a `docker ps`.
   130  
   131  ## Looking for troubleshooting help?
   132  
   133  Typically, the above steps work out-of-the-box, but some scenarios can cause problems. If your `docker run hello-world` didn't work and resulted in errors, check out [Troubleshooting](/toolbox/faqs/troubleshoot.md) for quick fixes to common problems.
   134  
   135  ## Where to go next
   136  
   137  At this point, you have successfully installed the Docker software. Leave the
   138  Docker Quickstart Terminal window open. Now, go to the next page to [read a very
   139  short introduction Docker images and containers](step_two.md).
   140  
   141  
   142  &nbsp;