To use the docker-registry-proxy on Windows, you must install the proxy's CA certificate into both the Windows certificate store and the WSL2 distribution (if using the WSL2 backend), then configure the proxy settings in Docker Desktop.
1. Obtain the Certificate
Download the certificate from your proxy host using a browser (e.g., http://<proxy-host>:3128/ca.crt) and save it to a local path like d:\ca.crt.
2. Install Certificate in Windows
- Double-click the
.crt file. - Select Install Certificate... and click Next.
- Select Current user and click Next.
- Select Place all certificates in the following store, click Browse, and choose Trusted Root Certification Authorities.
- Complete the installation.
Note: If you are NOT using the WSL2 backend, skip the WSL2 steps below and restart Docker Desktop.
3. Install Certificate in WSL2 (Required for WSL2 Backend)
If using the WSL2 backend, you must also import the certificate into the docker-desktop distribution:
- Identify your distribution (usually
docker-desktop) using wsl --list in PowerShell. - Enter the distribution shell:
wsl --distribution docker-desktop
- Copy the certificate from your Windows drive to the WSL certificate store and update the CA certificates:
cp /mnt/host/d/ca.crt /usr/local/share/ca-certificates/
update-ca-certificates
(Note: You may see a warning about ca-certificates.crt not containing exactly one certificate; the operation has still succeeded.) - Type
exit to leave the WSL shell.
4. Configure Docker Desktop Proxy Settings
- Open Docker Desktop Settings.
- Navigate to Resources > Proxies.
- Enable the proxy.
- Set
http://<proxy-host>:3128 as both the HTTP and HTTPS URL.
5. Verification
Run the following command in a Windows shell (not inside WSL) to verify connectivity:
docker pull hello-world
If you encounter certificate trust errors, try restarting Docker Desktop or restarting Windows to force a WSL restart.
# Verify the proxy works by pulling an image in a Windows shell
docker pull hello-world