Sharing namespaces within Docker

Consider that application A is an app that provides a form of clustering with an allowed designated number of slaves to join on this cluster. Applications B, C, and D would need to join this cluster in order to function properly. What I would like to do is have application A inside a container, while having applications B, C, and D setup within their own containers. Exposing ports is not an option for this. This should be done without networking functionality as there is no modifying the code for applications A, B, C, and D. I simply would like to be able to have B, C, and D be able to access the application A from within their own containers. Perhaps this is not even possible, as this is the point of Docker / containers, isolation, however, considering docker currently has the –net option to share the host networking stack I am sure this could not be to difficult implement?

  • malformed HTTP response with docker private registry (v2) behind an nginx proxy
  • How to create docker image from jenkins running on docker
  • add a data file with docker run
  • Deploying with docker push is slow because there are many images
  • Cannot change ownership of host directory mounted with docker-machine on MAC
  • docker --storage-opt dm.basesize=40G does not work?
  • How to gracefully shut down a server running in docker
  • Synchronizing numeric user id's between Dockerfiles and docker-compose.yml?
  • How to use the docker connection-plugin of ansible?
  • Pushing to docker registry fails: Error mounting /dev/mapper/…: device or resource busy
  • Mapping node_modules in a for use in a container_command
  • Cache “go get” in docker build
  • One Solution collect form web for “Sharing namespaces within Docker”

    If all containers run on one machine, then --link is intended for this sort of use-case. However applications have to be able to use different ports configured by environment variables.

    There is a lot of activity on the Docker GitHub at the moment discussing clusters, groups and networking, so you should expect better native support in future.

    You could consider ‘weave’, which creates a virtual overlay network where all your containers, even in different datacenters, can talk to each other as if they were on the same Ethernet switch. Please note I work on weave.

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