Fix port redirection issues with Docker 0.7

Docker 0.7 changed the default behavior for port redirections
which broke the whole project. This patch makes changes to
accomodate the new port forwarding logic and requirements.