Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

212
Vistas
Why is docker looking in /simple for python packages?

I've been trying to get django to run via uwsgi in a docker container.

I had django running in docker, with its built in web server, but now that I've modified the requirements.txt to include uwsgi, I keep getting the following error message:

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/uwsgi/

So it seems like the url docker is using for pip packages is /simple, but how did that change? When I first created the container django and psycopg got downloaded fine.

I tried specifying the full URL of the uwsgi package, but that didn't work either.

docker-compose.yaml:

version: '3'
services:
  db:
    image: postgres
  web:
    dns: 8.8.8.8
    build: .
    command: uwsgi --http :8000 --module destExp.wsgi
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    depends_on:
      - db

Dockerfile:

FROM python:3.5
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
CMD uwsgi --http :8000 --module destExp.wsgi
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

That error is due pip is unable to reach to the mirror host. Part /simple/uwsgi is being used as pip url path.

DNS line in Compose is ignored for v3 specification if you are deploying to Swarm, as stated in the doc. Here is a workaround to make pip use different DNS momentarily, simply update your pip line in Dockerfile to following:

RUN echo nameserver 8.8.8.8 > /etc/resolv.conf && pip install -r requirements.txt

Hope that helps. As a permanent solution, you should investigate how to make your orchestration use the custom DNS or troubleshoot the current DNS from the container for your case.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda