I have a simple docker-compose set up as follows.
version: \"3\" services: main: image: python:3.5.2 entrypoint: /usr/bin/yes network_mode: bridge
delete this network_mode: bridge from your compose file, worked for me =).
network_mode: bridge