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

  • Collectd pushes the actual host system metrics to graphite instead of the docker container's restricted system metrics
  • consul-template using Address not ServiceAddress in template
  • Is there docker orchestration for Hadoop cluster
  • Tomcat hosted on centos:centos7 docker container, can't view webpage outside of container
  • Symfony2 plugin for Oh my Zsh in Docker
  • Discourse forum output
  • Vagrant tells me on vagrant up that (host) port 5000 is already in use.

  • Docker Container starting with mongo server
  • “update --memory” can not work
  • Is there any way to make Docker download public images faster?
  • How to check the configuration of an app deployed on docker container
  • “blkio.throttle.io_serviced” pseudo-files return zero values for one container
  • How to create a MongoDB docker and save the DB's configuration?
  • 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.