Troubles with mapping ports on a very simple Docker container
May be you are using bridge network mode. In that case, you need to bind your host port to container port to use same port. 
So when you execute docker run, you may need to add 
-p 5000:5000 as a flag to docker run command. Also I don't see any expose in Dockerfile. So you may want to add EXPOSE 5000 in Dockerfile just above cmd.