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

  • Proxy_pass from foo.website.com to localhost:xxxx using nginx on docker - not localhost on physical machine
  • Where does Docker know where to pull the .sh scripts from when building a Dockerfile?
  • running docker inside bazel test env on osx
  • Dockerize Applications or Machines?
  • docker-compose start “ERROR: No containers to start”
  • File name too long on docker
  • Vagrant tells me on vagrant up that (host) port 5000 is already in use.

  • How do you get a file from a windows host to linux docker container?
  • Should I restart docker container if I'm doing update
  • Why is apt-get update failing inside of a docker container?
  • GCE persistent disk, kubernetes, and data persistence
  • Why Docker on Virtualbox can't find my DockerFile?
  • Craft CMS With Php/Nginx on Docker can't write outside Document Root
  • 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.