title: I can't connect to the proxy from the docker container
body: <p>My problem is that I can't connect to the proxy when I'm inside the docker container.</p>
  
  <p>I can connect from outside:</p>
  
  <pre><code>curl --proxy 127.0.0.1:24000 "http://lumtest.com/myip.json"
  
  {"ip":"185.36.254.160","country":"PL","asn":{"asnum":62240,"org_name":"Clouvider Limited"},"geo":{"city":"Warsaw","region":"14","postal_code":"00-202","latitude":52.25,"longitude":21,"tz":"Europe/Warsaw"}}
  </code></pre>
  
  <p>But when I'm trying to connect from inside of the docker container I'm getting an error.</p>
  
  <pre><code>curl --proxy 127.0.0.1:24000 "http://lumtest.com/myip.json"
  curl: (7) Failed to connect to 127.0.0.1 port 24000: Connection refused
  </code></pre>
  
  <p>My docker-compose file looks like this:</p>
  
  <pre><code>version: '3'
  
  services:
    backend:
      build: ./
      volumes:
        - ./:/app
      env_file:
        - .env
      ports:
        - 8000:8888
  
    proxy:
      build:
        context: .
        dockerfile: luminati-lpm/Dockerfile
      ports:
        - 22999:22999
        - 22998:22998
        - 24000:24000
  </code></pre>
  
  <p>Docker file for django container:</p>
  
  <pre><code>FROM python:3.7.5
  
  RUN mkdir /app
  WORKDIR /app
  
  # Add current directory code to working directory
  ADD . /app/
  
  # set default environment variables
  ENV PYTHONUNBUFFERED 1
  ENV LANG C.UTF-8
  ENV DEBIAN_FRONTEND=noninteractive
  
  ENV PORT=8888
  
  RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends \
          tzdata \
          python3-setuptools \
          python3-pip \
          python3-dev \
          python3-venv \
          git \
          postgresql-11 \
          &amp;&amp; \
      apt-get clean &amp;&amp; \
      rm -rf /var/lib/apt/lists/*
  
  RUN pip3 install --upgrade pip
  RUN pip3 install pipenv
  
  RUN pipenv install --skip-lock --system --dev
  
  EXPOSE 8888
  EXPOSE 5432
  
  CMD gunicorn estatefilter_backend.wsgi:application --bind 0.0.0.0:$PORT
  '''
  </code></pre>