1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/getstarted/step_one.md
Victoria Bialas 0254c12e1e surfacing Learn by example topics to top level of Docker Engine docs
fixing links after moving surfacing tutorials

fixing more links for the newly located tutorials

WIP: merging 3 getting started tutorials into one to cover all platforms, added new files

fixing broken images and links in 3-in-1 getting started, re-wrote story flow, linked to Toolbox, d4mac,d4win

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
2016-06-14 21:08:44 -07:00

6.3 KiB

Install Docker

Step 1: Get Docker

Docker for Mac

Docker for Mac is our newest offering for the Mac. It runs as a native Mac application and uses xhyve to virutalize the Docker Engine environment and Linux kernel-specific features for the Docker daemon.

Get Docker for Mac

Install Prequisites

  • 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)

  • OS X 10.10.3 Yosemite or newer

  • At least 4GB of RAM

  • 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.

Docker Toolbox for the Mac

If you have an earlier Mac that doesn't meet the Docker for Mac prerequisites, get Docker Toolbox for the Mac.

See Docker Toolbox Overview for help on installing Docker with Toolbox.

Docker for Windows

Docker for Windows is our newest offering for PCs. It runs as a native Windows application and uses Hyper-V to virutalize the Docker Engine environment and Linux kernel-specific features for the Docker daemon.

Get Docker for Windows

Install Prequisites

  • 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.

  • The Hyper-V package must be enabled. The Docker for Windows installer will enable it for you, if needed. (This requires a reboot).

Docker Toolbox for Windows

If you have an earlier Windows system that doesn't meet the Docker for Windows prerequisites, get Docker Toolbox.

See Docker Toolbox Overview for help on installing Docker with Toolbox.

Docker for Linux

Docker Engine runs navitvely on Linux distributions.

For full instructions on getting Docker for various Linux distributions, see Install Docker Engine.

Step 2: Install Docker

Step 3: Verify your installation

  1. Open a command-line terminal, and run some Docker commands to verify that Docker is working as expected.

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.)

  1. Type the docker run hello-world command and press RETURN.

    The command does some work for you, if everything runs well, the command's output looks like this:

     $ docker run hello-world
     Unable to find image 'hello-world:latest' locally
     latest: Pulling from library/hello-world
     535020c3e8ad: Pull complete
     af340544ed62: Pull complete
     Digest: sha256:a68868bfe696c00866942e8f5ca39e3e31b79c1e50feaee4ce5e28df2f051d5c
     Status: Downloaded newer image for hello-world:latest
    
     Hello from Docker.
     This message shows that your installation appears to be working correctly.
    
     To generate this message, Docker took the following steps:
     1. The Docker Engine CLI client contacted the Docker Engine daemon.
     2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub.
     3. The Docker Engine daemon created a new container from that image which runs the
        executable that produces the output you are currently reading.
     4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it
        to your terminal.
    
     To try something more ambitious, you can run an Ubuntu container with:
     $ docker run -it ubuntu bash
    
     Share images, automate workflows, and more with a free Docker Hub account:
     https://hub.docker.com
    
     For more examples and ideas, visit:
     https://docs.docker.com/userguide/
    
  2. Run docker ps -a to show all containers on the system.

     $ docker ps -a
    
     CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
     592376ff3eb8        hello-world         "/hello"            25 seconds ago      Exited (0) 24 seconds ago                       prickly_wozniak
    

    You should see your hello-world container listed in the output for the docker ps -a command.

    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.

Looking for troubleshooting help?

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 for quick fixes to common problems.

Where to go next

At this point, you have successfully installed the Docker software. Leave the Docker Quickstart Terminal window open. Now, go to the next page to read a very short introduction Docker images and containers.