Proxy Authentication Required error when fetching image

Docker worked with our NTLM proxy directly by adding the username and password to the URL in the configuration file:

sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment="HTTP_PROXY=http://username:password@proxy.ourcompany.com:8080/"