Cannot build docker image with Zscaler

156 views Asked by At

I'm building a docker image with windows container and having issues due to zscaler. When running my build I receive the following after trying to install chocolatey in the image.

Exception calling "DownloadString" with "1" argument(s): "The underlying
connection was closed: Could not establish trust relationship for the SSL/TLS
secure channel."
At line:1 char:241
+ ...  -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('ht ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordE
   xception
    + FullyQualifiedErrorId : WebException

This is the line I use for contact:

RUN Set-ExecutionPolicy Bypass -Scope Process -Force; \
  [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \
  iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'));

My Zscaler cert is added to "Trusted Root Certification Authorities" and also added to /usr/local/share/ca-certificates in wsl.

My docker daemon looks like the following

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "bridge": "Internet",
  "dns": [
    "<MY_DNS>",
    "8.8.8.8"
  ],
  "debug": false,
  "experimental": false
}
0

There are 0 answers