Setting up Docker

Docker is an open source platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production [ref 1].

Install Docker

Click the tab according to your operating system and follow the steps to install Docker.

Install Docker using shell script

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

For more details check out Docker’s official Linux installation web page.

Verify Docker Setup

Click the tab according to your operating system and follow the steps to verify Docker installation.

Open terminal app

# First run the following command to confirm that docker is running.
docker -v

# Correct output will give the docker's version
Docker version 18.09.0, build 4d60db4

# Second run the following command to verify the docker's setup.
docker run hello-world

# Correct output should be like the following.
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/

For more examples and ideas, visit:
https://docs.docker.com/get-started/

Can’t Install? Try online

If installation of docker is not possible locally then you can use a free sandbox provided by docker for practicing. You will need to register with docker to use the sandbox. You can run the basic commands after login to sandbox.