Summary
In a clean base image / docker image running RHEL8 (ubi in my case), some tools don't seem to "play nice" with the system certs when run under uv. One being the mkdocstrings plugin for mkdocs. When it tries to reach out to a public repo to gather Python doc inv files (ie: https://docs.python.org/3/objects.inv) it fails with an SSL certificate failure. Setting the SSL_CERT_FILE env var to the default path of the system cert bundle (ie: /etc/pki/tls/certs/ca-bundle.crt) works as expected, but passing the --native-tls flag to uv does not.
I'm not sure if you have access to "ubi" base images or not, but the steps to reproduce look something like this:
- Run
docker run -it icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi /bin/bash (mounting a sample workspace into the container if needed)
- Run
uv run mkdocs build --strict - build fails
- Run
uv run --native-tls mkdocs build --strict - build fails
- Run
SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt uv run mkdocs build --strict - build succeeds
The sample project I'm working on has some dependencies like this:
dev = [
"mkdocs",
"mkdocs-material",
"mkdocstrings[python]"
]
and an mkdocs.yml file that looks something like this:
site_name: "fubar"
theme:
name: material
plugins:
- mkdocstrings:
default_handler: python
handlers:
python:
import:
- https://docs.python.org/3/objects.inv
The exact error produced is:
ERROR - mkdocstrings: Couldn't load inventory https://docs.python.org/3/objects.inv through handler 'python': <urlopen error [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)>
Platform
RHEL8
Version
uv 0.6.14
Python version
Python 3.10.16, Python 3.9.18
Summary
In a clean base image / docker image running RHEL8 (ubi in my case), some tools don't seem to "play nice" with the system certs when run under
uv. One being themkdocstringsplugin formkdocs. When it tries to reach out to a public repo to gather Python doc inv files (ie: https://docs.python.org/3/objects.inv) it fails with an SSL certificate failure. Setting theSSL_CERT_FILEenv var to the default path of the system cert bundle (ie:/etc/pki/tls/certs/ca-bundle.crt) works as expected, but passing the--native-tlsflag touvdoes not.I'm not sure if you have access to "ubi" base images or not, but the steps to reproduce look something like this:
docker run -it icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi /bin/bash(mounting a sample workspace into the container if needed)uv run mkdocs build --strict- build failsuv run --native-tls mkdocs build --strict- build failsSSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt uv run mkdocs build --strict- build succeedsThe sample project I'm working on has some dependencies like this:
and an
mkdocs.ymlfile that looks something like this:The exact error produced is:
Platform
RHEL8
Version
uv 0.6.14
Python version
Python 3.10.16, Python 3.9.18