title: Unable to connect multiple python socket.io inside docker
body: <p>I built a docker-compose of a simple python3.6 container exposing port 5000. This container run a python server side script waiting for clients to connect. Here are the files:</p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM python:3.6-alpine
  
  WORKDIR /app
  CMD ["python","serveur.py"]
  </code></pre>
  
  <p>Docker-compose:</p>
  
  <pre><code>version: '2'
  services:
    serveur:
      build:
        context: .
        dockerfile: Serveur
      ports:
        - "127.0.0.1:5000:5000"
      volumes:
        - "./app:/app"
  </code></pre>
  
  <p>serveur.py:</p>
  
  <pre><code>#!/usr/bin/python3 
  import socket  
  import threading
  
  print("debut du programme")
  socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  host = "0.0.0.0"
  port = 5000
  socket.bind((host, port))
  socket.listen(5)
  
  for i in range(2):
          print("ready to connect")
          a,b = socket.accept()
          print("Client connected")
  
  socket.close()
  </code></pre>
  
  <p>Here is the issue:</p>
  
  <p>-If I run the docker compose, my client cant connect on the server; the code seems to block.More over, none of the print are showing in the Docker logs.  If I take the socket.accept() out of the loop, one client can connect and I see all the print in the logs. If I take the loop out of the code and I just align multiple socket.accept(), well, the code block. </p>
  
  <p>I know the issue is with my Docker settings because if I run this script out of Docker, the serveur.py works perfectly. </p>
  
  <p>Thanks guys for your time. </p>