How to install Docker and test that it works

Geraldine Van der Auwera
  • Updated

Read on to learn about installing Docker software, testing the program, and how to fix any problems.

Step 1. Download and install the software

1.1. Follow the link below that corresponds to your computer system. 

Click here for Mac  |  Click here for Windows  |  Full list of supported systems and their install pages 

1.2. On Mac and Windows, select the "Stable channel" download.

1.3. Run through the installation instructions and initial setup page; they are straightforward and should take only a few minutes (not counting download time).

Below are  instructions for all steps after that first page, so you shouldn't need to go to any other pages in the Docker documentation. 

What to expect (Mac)

On Mac, the installation adds a menu bar item that looks like a whale/container-ship, which shows the status of the Docker "daemon" (= program that runs in the background) and provides access to various Docker-related functionalities in a browser interface.

You can use access Docker from the command-line, which is what we'll do in the rest of this tutorial.

Step 2. Test that the program runs

2.1. Open a terminal window and invoke the docker program directly.

Checking the version is a good way to test that a program runs without investing too much effort into finding a command that works. 

2.2. Execute the command below as a test.

docker --version

What to expect

This should return something like Docker version 17.06.0-ce, build 02c1d87. That means the base software is installed on your machine.

Step 3. Identify yourself

3.1. These instructions assume you will use Dockerhub, so you need to create an account there in order to pull down images and publish your own.

3.2. Run this command to authenticate your Dockerhub account:

docker login

What to expect

The command should prompt you for your password and authenticate you as long as your Docker program stays running (including running in the background).

Step 4. Get an image and run a container

Now, let's see if you can retrieve an image and run a container, using an example Docker image that we published in DockerHub.

4.1. Download the image with this command:

docker pull vdauwera/tutorial_example:picard-2.9.0

4.2. Then, run this one to spin up the container:

docker run -it vdauwera/tutorial_example:picard-2.9.0

What to expect

If that works without any obvious errors, you're all set.

Next steps

See Make a Docker (container) the easy way: Using a base image and Publish a Docker container image to Google Container Registry (GCR) to proceed.


If you run into trouble, you may need to run one or more of the following commands:

docker-machine restart default
docker-machine regenerate-certs
docker-machine env


Was this article helpful?

0 out of 0 found this helpful



Please sign in to leave a comment.