Install Docker

Make sure curl is installed on the Ubuntu VM:

sudo apt update
sudo apt install curl
If you are behind a corporate firewall (replace “proxyhost:port” with your actual proxy information)

https_proxy=”https://proxyhost:port” curl -fsSL | sudo apt-key add -


curl -fsSL | sudo apt-key add -

Expected Response:


Add the docker package repository:

sudo apt-add-repository “deb ubuntu-xenial main”

Install packages:

sudo apt update
sudo apt-cache policy docker-engine
    sudo apt install docker-engine
    sudo apt install docker-compose

If you are behind a corporate firewall, you will need to configure proxy settings for docker so that images may be obtained from internet repositories. In the commands shown here, replace “proxyhost:port”, “”, and “” with appropriate values.

Make the docker configuration directory:

    sudo mkdir -p /etc/systemd/system/docker.service.d

Edit (create) this file:
            sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf

Add these lines:





Restart docker:
sudo systemctl daemon-reload
sudo systemctl restart docker

Add yourself to the docker user group (replace “userid” with your user ID):

sudo usermod -a -G docker *userid*

Log out and log back in so that the user group change will takeeffect.

Verify that you can connect to docker as yourself (i.e. not as root):

docker ps

Verify that you can download and run the hello-world container

docker run hello-world