这是indexloc提供的服务,不要输入任何密码
Skip to content

Manual proxy setting and proxy authentication in Docker Desktop #14880

@harrycch

Description

@harrycch

Description

I am using a PC behind a proxy with authentication. I have tried to use Docker Desktop with automatic proxy. I can search for the images but cannot pull images. It gives authenticationrequired error. I contacted the proxy owner to temporarily bypass my proxy authentication, and then I can successfully pull images. So this confirmed that the problem was due to the authentication. But I cannot keep the bypass forever due to security reason.

After some searching, I found someone mentioned that the Docker pull may not support NTLM authentication (Although I expect that all Docker operations should be using exactly the same proxy setting as in Docker Desktop).

So I tried to install CNTLM on my PC and setup a proxy URL without authentication. Then, I have turned on "Manual proxy configuration" in Docker Desktop and input the CNTLM proxy url, and restart Docker Desktop multiple times.
When I browse the Docker Hub on Docker Desktop, I can search for the images and I have verified that the searching is already using my manual CNTLM proxy. However, when I try to pull images, it still gives authenticationrequired error and my CNTLM proxy has no logs, which means that the "docker pull" is still using the automatic system proxy but cannot pass the authentication.

For all testing of docker pull mentioned above, I have tried both clicking the "Pull" button on Docker Desktop and using "docker pull" command in the terminal in Docker Desktop.

I am using Windows 11 LTSC 24H2 and Docker 4.41.2

Please help.

Reproduce

  1. Use Docker Desktop on Windows 11 behind a proxy with authentication
  2. Try pull images (error)
  3. Turn on "Manual Proxy configuration" and enter proxy url without authentication
  4. Try pull images again (error, and the pull did not use the manual proxy)

Expected behavior

Docker pull should follow the proxy setting of Docker Desktop setting (both proxy with authentication or manual proxy)

docker version

Client:
 Version:           28.1.1
 API version:       1.49
 Go version:        go1.23.8
 Git commit:        4eba377
 Built:             Fri Apr 18 09:53:24 2025
 OS/Arch:           windows/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.41.2 (191736)
 Engine:
  Version:          28.1.1
  API version:      1.49 (minimum version 1.24)
  Go version:       go1.23.8
  Git commit:       01f442b
  Built:            Fri Apr 18 09:52:57 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    28.1.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  ai: Docker AI Agent - Ask Gordon (Docker Inc.)
    Version:  v1.1.7
    Path:     C:\Program Files\Docker\cli-plugins\docker-ai.exe
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.23.0-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  cloud: Docker Cloud (Docker Inc.)
    Version:  v0.3.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-cloud.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.35.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.38
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  desktop: Docker Desktop commands (Docker Inc.)
    Version:  v0.1.8
    Path:     C:\Program Files\Docker\cli-plugins\docker-desktop.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.27
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  mcp: Docker MCP Plugin (Docker Inc.)
    Version:  dev
    Path:     C:\Program Files\Docker\cli-plugins\docker-mcp.exe
  model: Docker Model Runner (Docker Inc.)
    Version:  v0.1.11
    Path:     C:\Program Files\Docker\cli-plugins\docker-model.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.17.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 28.1.1
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 nvidia runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.6.87.2-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 7.644GiB
 Name: docker-desktop
 ID: 7c4f4029-6cd7-476c-86e4-790300f46047
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http://<my_system_proxy>:8080
 HTTPS Proxy: http://<my_system_proxy>:8080
 No Proxy: <local>
 Labels:
  com.docker.desktop.address=npipe://\\.\pipe\docker_cli
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW is set
WARNING: daemon is not using the default seccomp profile

Diagnostics ID

none

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions