Installing Docker

On Windows 10

  1. Download DockerToolbox
  2. Install DockerToolbox and make sure you select "Install Virtualbox with NDISS driver (default NDIS6)
  3. Launch docker quickstart terminal or run a command window as administrator
    1. This should kick of a series of activities to create a "default" docker machine, SSH keys etc
  4. Run docker-machine status
    1. if it responds by saying there is no machine, do step 5 
  5. Run docker-machine create
  6. Once the machine has been created run docker-machine env > docker-env-settings.bat
    1. You now have the environment variables for your machine, you can either run these each time you open a command window or set them permanently, I would strongly advise on setting these as permanent environment variables before opening a DOS shell (as administrator)
  7. Depending on whether you like using the linux style shell or a DOS shell, follow the steps below
    1. For the linux shell, go to step 8
    2. For the DOS shell, stop the docker machine - docker-machine stop
    3. Close the linux window
    4. Open a DOS shell as administrator
    5. Run docker-machine start
    6. Once all activities have completed, you can use the docker command
  8. run docker login (if you have docker account and want to pull down docker images)
    1. you will need your hub.docker.com user name and password
    2. You can now pull down docker images

info

At a later date you may need to rerun docker-machine env if the IP etc change


On Centos 6.x Linux

Docker is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we’ll install the EPEL repository:

  1. rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Then, as a matter of best practice, we’ll update our packages:

2. yum update -y

Now let’s install Docker by installing the docker-io package:

3. yum -y install docker-io

Once the installation completes, we’ll need to start the Docker daemon:

4. service docker start

And finally, and optionally, let’s configure Docker to start when the server boots:

5. chkconfig docker on