Docker installation on Mac

This post is only valid for OS X, and it is the first post of Spark installation blog series.

  1. Docker installation is straightforward: https://docs.docker.com/engine/installation/mac/
  2. The only problem I encountered is “Network timeout” when pulling docker image as follows,

    ➜  ~  docker run hello-world
    Unable to find image 'hello-world:latest' locally
    Pulling repository docker.io/library/hello-world
    Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy.

    The solution can be found at stackoverflow: http://stackoverflow.com/questions/31990757/network-timed-out-while-trying-to-connect-to-https-index-docker-io, though I first thought it was caused by the great fire wall.

  3. At last, run the command docker run -it ubuntu bash and we see the success message:
    Unable to find image 'ubuntu:latest' locally
    latest: Pulling from library/ubuntu
    0a85502c06c9: Pull complete
    0998bf8fb9e9: Pull complete
    a6785352b25c: Pull complete
    e9ae3c220b23: Pull complete
    Digest: sha256:f91f9bab1fe6d0db0bfecc751d127a29d36e85483b1c68e69a246cf1df9b4251
    Status: Downloaded newer image for ubuntu:latest
    root@efd6897c7f9f:/# uname -a
    Linux efd6897c7f9f 4.1.13-boot2docker #1 SMP Fri Nov 20 19:05:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    root@efd6897c7f9f:/#

Now it’s good to move next to install kubernetes.