1

i need your help,

My docker don't run on my enterprise, I do not know what to do

kaue default # docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pulling fs layer 
docker: error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/e3/e38bc07ac18ee64e6d59cf2eafcdddf9cec2364dfe129fe0af75f1b0194e0c96/data?verify=1528483070-KGbywXnskgTKu5B9AuTdFPQdYjs%3D: x509: certificate signed by unknown authority.
See 'docker run --help'

.

I have a Windows 7, and Authenticated proxy in my job...

Kaue
  • 17
  • 1
  • 7

2 Answers2

1

Set the proxy in your environment before running the docker run command...

set HTTPS_PROXY=http://user:password@proxy_name_or_ip:proxy_port

For example set HTTPS_PROXY=http://myusername:Password1@proxy.local:8080

Andy R
  • 26
  • 1
1

For docker on windows, follow these steps to configure the proxy variables:

In powershell perform the following for HTTP_PROXY and HTTPS_PROXY:

[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://username:password@proxy:port/", [EnvironmentVariableTarget]::Machine)

Once the variables are set, restart the service with powershell:

Restart-Service docker

Edit: For Linux native installs of Docker using systemd, follow these steps to configure your proxy:

  1. Create a systemd drop-in directory for the docker service:
$ sudo mkdir -p /etc/systemd/system/docker.service.d
  1. Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"

Or, if you are behind an HTTPS proxy server, create a file called /etc/systemd/system/docker.service.d/https-proxy.conf that adds the HTTPS_PROXY environment variable:

[Service]
Environment="HTTPS_PROXY=https://proxy.example.com:443/"
  1. If you have internal Docker registries that you need to contact without proxying you can specify them via the NO_PROXY environment variable:
[Service]    
Environment="HTTP_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com"

Or, if you are behind an HTTPS proxy server:

[Service]    
Environment="HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com"
  1. Flush changes:
$ sudo systemctl daemon-reload
  1. Restart Docker:
$ sudo systemctl restart docker
  1. Verify that the configuration has been loaded:
$ systemctl show --property=Environment docker
Environment=HTTP_PROXY=http://proxy.example.com:80/

Or, if you are behind an HTTPS proxy server:

$ systemctl show --property=Environment docker
Environment=HTTPS_PROXY=https://proxy.example.com:443/

For special characters in your password, you can use unicode to encode the characters:

If your original password was: F@o:o!B#ar$

The unicode equivalent would be: F%40o%3Ao%21B%23ar%24

BMitch
  • 231,797
  • 42
  • 475
  • 450
  • Thank you, but I use Linux Mint, and i try configure HTTPS_PROXY, in /etc/default/docker, and i did not sucess – Kaue Jun 08 '18 at 18:52
  • @kaue The "Windows 7" part of the question is confusing me. For Linux, configure the proxy variables in your systemd settings, /etc/default is only used by some vendor specific docker installs, not by the upstream docker-ce: https://docs.docker.com/config/daemon/systemd/#httphttps-proxy – BMitch Jun 08 '18 at 19:39