Port mapping problem

OS: Centos 7
Docker version 17.03.0-ce, build 60ccb22
docker-compose version 1.11.2, build dfed245

I need to map a large range of ports (40000-60000/udp) but i always get this error when creating the image:
ERROR: for red5pro UnixHTTPConnectionPool(host=‘localhost’, port=None): Read timed out. (read timeout=60)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

here is the compose file

version: '2’
services:
red5pro:
build: ./red5pro/
container_name: red5pro
ports:
- “5080:5080”
- “1935:1935”
- “8554:8554”
- “6262:6262”
- “8081:8081”
- “40000-60000:40000-60000/udp”

and the Dockerfile:
FROM java:8
MAINTAINER Ramy Mabrouk <ramymabrouk@t@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y
libva1
libva-drm1
libva-x11-1
libvdpau1

WORKDIR /opt/red5pro
COPY / /opt/red5pro/
ENTRYPOINT [“sh”,"/opt/red5pro/red5.sh"]

Thank you

COMPOSE_HTTP_TIMEOUT=1000 docker-compose up -d

is it just slow or not working at all?
how slow is it? probably you could time it COMPOSE_HTTP_TIMEOUT=1000 time docker-compose up -d

not working at all, I got the same error message after a long waiting time

ERROR: for red5pro UnixHTTPConnectionPool(host=‘localhost’, port=None): Read timed out. (read timeout=1000)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 1000).

deleted the container and image and creating again using “COMPOSE_HTTP_TIMEOUT=2000” throw this error

ERROR: for red5pro Cannot start service red5pro: driver failed programming external connectivity on endpoint red5pro (5c60d7a4e00ab775236dc89a2d095c2858f5078afb3433efccf0dcfac9462011): Error starting userland proxy: listen udp 0.0.0.0:57278: bind: address already in use
ERROR: Encountered errors while bringing up the project.
4.08user 0.62system 17:54.77elapsed 0%CPU (0avgtext+0avgdata 72324maxresident)k
0inputs+180912outputs (0major+50459minor)pagefaults 0swaps

Also I found these messages in the logs

Mar 15 11:52:30 devserver dockerd[31440]: time=“2017-03-15T11:52:30.945076118+02:00” level=warning msg="Failed to allocate and map port 57278-57278: Error starting userland proxy: listen udp 0.0.0.
Mar 15 12:02:24 devserver dockerd[31440]: time=“2017-03-15T12:02:24.400138745+02:00” level=error msg="Handler for POST /v1.22/containers/095791fe989bfd22323f65d5ac6432306dea768d12c13c19f89dcf7bec58

If you really need to allocate a third of the possible port space, then you’re probably better off using host networking (start the container with --net host and don’t -p anything, you will share the host’s IP address and TCP/UDP port spaces). An application that doesn’t listen on a small predictable set of ports isn’t quite Docker’s sweet spot.