share ports between docker and vagrant

How do I share guest ports between vagrant and docker (docker standalone, not as vagrant provider)?

I tried: docker guest 5000 <> host 5000 <> vagrant guest 5000

  • Deploying Docker containers with port-mapping on Mesos/Marathon
  • How should I create a Dockerfile to run more than one services in one instance?
  • Configuring Docker multi-container App with Spring Cloud Server for OpenShift Origin
  • Importance of the place of CMD in Dockerfile
  • nginx windows 10 upstream timeout
  • Docker Jboss/wildfly: How to add datasources and MySQL connector
  • Vagrant tells me on vagrant up that (host) port 5000 is already in use.

  • Trouble deploying docker on AWS with ecs-cli
  • RubyMine connect to database
  • Access host port as localhost from docker
  • Docker - curl returned “connection reset”
  • Can docker log to multiple gelf destinations
  • PID mapping between docker and host
  • One Solution collect form web for “share ports between docker and vagrant”

    You can’t have two things listen on the same port unless you have two network cards in your machine. Because you’re running your docker container that is exposing port 5000 and your vagrant box exposes port 5000, you’re getting a conflict.

    You will have to expose a different port on one or the other if you want them both to run at the same time.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.