Tag: networking

How to communicate between Docker containers via “hostname”

I plan to split my monolthic server up into many small docker containers but haven’t found a good solution for “inter-container communication” yet. This is my target scenario: I know how to link containers together and how to expose ports, but none of these solutions are satisfying to me. Is there any solution to communicate […]

Does a docker container have its own TCP/IP stack?

I’m trying to understand what’s happening under the hood to a network packet coming from the wire connected to the host machine and directed to an application inside a Docker container. If it were a classic VM, I know that a packet arriving on the host would be transmitted by the hypervisor (say VMware, VBox […]

Communication between multiple docker-compose projects

I have two separate docker-compose.yml files in two different folders: ~/front/docker-compose.yml ~/api/docker-compose.yml How can I make sure that a container in front can send requests to a container in api? I know that –default-gateway option can be set using docker run for an individual container, so that a specific IP address can be assigned to […]

Forward host port to docker container

Is it possible to have a Docker container access ports opened by the host? Concretely I have MongoDB and RabbitMQ running on the host and I’d like to run a process in a Docker container to listen to the queue and (optionally) write to the database. I know that I can forward from the container […]

How to expose docker container's ip and port to outside docker host without port mapping?

When i started two docker containers for a same web image on one docker host. two docker containers listened on the same port 5000 port 5000 of the two containers were mapped to different ports of docker host: 49155, 49156 to access the two containers from outside docker host need to be by accessing the […]

How can I set a static IP address in a Docker container?

I’m perfectly happy with the IP range that docker is giving me by default (176.17.x.x), so I don’t need to create a new bridge, I just want to give my containers a static address within that range so I can point client browsers to it directly. I tried using RUN echo “auto eth0” >> /etc/network/interfaces […]

docker network in bridge mode

I have planing to install docker but as we know default docker networking is in NAT mode so it has own IP on docker0 interface which is 172.17.42.x. I want to reconfigure networking in full bridge mode so all my container get IP address from my LAN Wireless Router I am following this article and […]

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