[Python] Trouble converting dockerfile pip to uv

Discussão em 'Python' iniciado por Stack, Fevereiro 24, 2025.

  1. Stack

    Stack Membro Participativo

    Here is my current dockerfile

    FROM python:3.9

    WORKDIR /app
    COPY ./requirements.txt /app/requirements.txt

    COPY ./ZscalerRootCertificate-2048-SHA256.pem /app/ZscalerRootCertificate-2048-SHA256.pem
    RUN cat /app/ZscalerRootCertificate-2048-SHA256.pem >> /etc/ssl/certs/ca-certificates.crt
    ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
    ENV NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt"
    ENV REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"

    RUN pip config set global.trusted-host \
    "pypi.org files.pythonhosted.org pypi.python.org" \
    --trusted-host=pypi.python.org \
    --trusted-host=pypi.org \
    --trusted-host=files.pythonhosted.org

    RUN pip install --cert /etc/ssl/certs/ca-certificates.crt --no-cache-dir --upgrade pip
    RUN pip install --cert /etc/ssl/certs/ca-certificates.crt --no-cache-dir -r /app/requirements.txt


    COPY . /app


    The trouble comes from the trusted-host config setting. Also, is uv compatible with pypi?

    Continue reading...

Compartilhe esta Página