title: Connection Refused to Minio Docker instance from my Django Application
body: <p>Hi im trying to connect to my Minio instance which is running inside a docker container from a django instance, which is also running inside a docker container.</p>
  <p>I keep getting this error:</p>
  <pre><code>2020-10-29 13:59:17,568 urllib3.util.retry DEBUG    Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
  2020-10-29 13:59:20,773 urllib3.connectionpool WARNING  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))': /
  2020-10-29 13:59:20,774 urllib3.connectionpool DEBUG    Starting new HTTPS connection (6): minio:9000
  </code></pre>
  <p>My docker-compose file is the following:</p>
  <pre><code>version: &quot;3.7&quot;
  
  services:
      db:
          container_name: db
          image: mariadb
          restart: always
          ports:
            - '3306:3306'
          environment:
            MYSQL_DATABASE: 'django_dev'
            MYSQL_USER: 'user'
            MYSQL_PASSWORD: 'password'
            MYSQL_ROOT_PASSWORD: 'password'
          volumes:
            - ./mariadb:/var/lib/mysql
  
      minio:
          container_name: minio
          image: minio/minio
          command: 'server /export'
          environment: 
            MINIO_ACCESS_KEY: weak_access_key
            MINIO_SECRET_KEY: weak_secret_key
          ports:
            - '9000:9000'
          volumes:
            - ./minio:/export
  
      web:
          container_name: web
          build: 
            context: ./django/
            dockerfile: ./Dockerfile
            target: dev
          command: python manage.py runserver 0.0.0.0:8000
          volumes: 
            - ./django:/usr/src/app
          ports:
            - &quot;8000:8000&quot;
          env_file: 
            - ./.env.dev
          depends_on:
            - minio
            - db
  
      phpmyadmin:
          container_name: db_viewer
          image: phpmyadmin/phpmyadmin
          restart: always
          ports:
            - '8080:80'
          environment:
            PMA_HOST: db
            MYSQL_ROOT_PASSWORD: 'password'
          depends_on:
            - db
  </code></pre>
  <p>The code to set up the client:</p>
  <pre><code>minioClient = Minio('minio:9000',
                    access_key='weak_access_key',
                    secret_key='weak_secret_key')
  minioClient.list_buckets()
  </code></pre>
  <p>Im using WSL2 as development environment.</p>
  <p>Python Version 3.7.7,
  Django Version 3.1.2,
  Minio Version 6.0.0</p>
  <p>Thank you for your time.</p>
  <p>*Edit: I reach the minio service with localhost:9000 from my machine.</p>