PyCharm Remote Interpreter and Docker: DNS Resolution Conflicts with IDE Certificate Validation
0 reputation · 19 Jun 2020, 20:43 UTC
0 reputation · 19 Jun 2020, 20:43 UTC
I am configuring PyCharm Professional (2024.x assumed) to use a Python remote interpreter running inside a Docker container on a private network. The container registry and internal package index sit behind a corporate proxy that presents a self-signed certificate, and the container's hostname is only resolvable through a custom DNS server set on the Docker daemon.
My understanding is that PyCharm relies on the host OS resolver for remote interpreter connections, while Docker containers may use DNS servers defined in the daemon or network configuration. At the same time, the IDE's HTTP client validates certificates against its own trust store (configurable under Settings | Build, Execution, Deployment), and there appears to be no GUI option to point that client at a custom DNS server or per-project hosts file.
It is unclear to me which resolver actually applies when the IDE connects to the containerized interpreter, and whether importing the proxy's self-signed certificate into the IDE trust store is sufficient for all IDE-originated traffic, or only some of it. Behavior may also differ between Community and Professional editions.
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.