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.

1. Get and install the software

Follow the relevant link below depending on your computer system. On Mac and Windows, select the "Stable channel" download. 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. 

Click here for Mac

Click here for Windows

Full list of supported systems and their install pages

On Mac, the installation adds a menu bar item that looks like a whale/container-ship, which conveniently shows you the status of the Docker "daemon" (= program that runs in the background) and provides GUI access to various Docker-related functionalities. Or you can use it from the command-line, which is what we'll do in the rest of this tutorial.

2. Test that the program runs

So now, 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. Let's do:

docker --version

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

3. Identify yourself

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. Then, run this command to authenticate your Dockerhub account:

docker login

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

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. Download the image with this command:

docker pull vdauwera/tutorial_example:picard-2.9.0

Then, run this one to spin up the container:

docker run -it vdauwera/tutorial_example:picard-2.9.0

If that works without any obvious errors, you're all set. See our other documentation on building your own container and storing your image in other repositories to proceed from here.

5. Troubleshooting

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

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.