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 very straightforward and should only take you a few minutes (not counting download time).
We have included instructions below for all steps after that first page, so you shouldn't need to go to any other pages in the Docker documentation. Frankly their docs are targeted at people who want to do things like run web applications on the cloud and can be quite frustrating to deal with.
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 gives you GUI access to various Docker-related functionalities. But you can also just 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 always a good way to test that a program will run without investing too much effort into finding a command that will work, so let's do:
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'll 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:
That should prompt you for your password and authenticate you for 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 actually retrieve an image and run a container, using an example docker image that we published in DockerHub. So, 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 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