Configuring Docker For Use With a Proxy

Docker support is only available with Intel® Movidius™ Neural Compute SDK 2.x.

If you are using Docker behind a proxy, you will need to configure your Docker client and services to use proxy settings in order to complete the NCSDK installation or build examples.

Official Docker Proxy Documentation

Proxy Setup on Ubuntu 16.04

The following steps show one example of a possible configuration for Docker proxy settings on Ubuntu 16.04 with docker-ce 18.03.1~ce-0-ubuntu. Refer to the official Docker documentation to configure your specific environment.

1. Create a docker config file at ~/.docker/config.json

Enter the following into the config file (replace the example proxy info with your proxy info):

{
 "proxies":
  {
    "default":
    {
      "httpProxy":"http://proxy.example.com:80"
    }
  }
}

2. Edit /etc/default/docker

Change the line that says this:

#export http_proxy="http://127.0.0.1:3128/"

to this (with the info for your proxy):

http_proxy="http://proxy.example.com:80"

3. Edit /lib/systemd/system/docker.service

Add this line to the Services section:

EnvironmentFile=/etc/default/docker

4. Reload services

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker

5. Edit /etc/NetworkManager/NetworkManager.conf

Note: This may not be necessary for your configuration.

Comment out the line that says dns=dnsmasq with a #:

#dns=dnsmasq

Restart the service.

$ sudo systemctl restart network-manager

6. Test

Pull the Docker image for Ubuntu 16.04:

$ sudo docker pull ubuntu:16.04