Create a network for two machines in docker that is not reachable from the host system

Is there a way to create a network with two docker containers in it which is not accessible from the host system?

I search some way to do what is called internal networking in virtualbox.

  • Mounting a Laravel's .env file into a Docker container
  • Mulitple Docker Containers on Port 80 with Same Domain
  • Docker Entrypoint Why I get the wrong parameter
  • Cassandra Container Dynamic storage in host
  • Setting up a local docker swarm w/o physical network
  • Oracle Java in Docker Container cannot resolve hostname after /etc/nsswitch.conf changed
  • If it is possible, how? And if it is not, why?

    Thanks 😀

  • Docker make .sh executable and run it
  • CLion in docker container not finding clang after install
  • How to access GIT repo with my private key from Dockerfile
  • Docker build: read-only file system
  • Containers are being spawned however the issued command fails when spawning multiple number of docker containers
  • Assign LAN IP address to Docker container different from host's IP address
  • One Solution collect form web for “Create a network for two machines in docker that is not reachable from the host system”

    you can adjust iptables rules in each container

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