Tag: networking

docker connect from container to public ip of host

I am using docker in bridge mode. I have kept the docker0 bridge in a custom network like this (I am using docker 1.9.1). /bin/docker daemon –bip=169.254.0.254/24 –fixed-cidr=169.254.0.0/24 And I created a network like this where I have put all all my containers. docker network create –driver=bridge –subnet=169.254.1.0/24 –ip-range=169.254.1.0/25 –gateway=169.254.1.1 myna I want to know […]

Docker container not accessible in host machine

Some of my containers are running a web server (PHP, NodeJS) in production. If we take the example of the NodeJS container, this is its configuration docker-compose.yml version: ‘2’ services: webapp: build: . volumes_from: – data links: – db:db – redis:redis ports: – ‘8080:3000′ restart: always … With this configuration, I’m able to access to […]

Weave takes my node offline when I hit a container's ip

I’m running weave with kubernetes/cni . I have a wordpress/mysql pod running on a kube minion. When I hit the url of the wordpress service via the browser, my node goes down (on azure). I upgraded to 8cores and 14gb ram and now when I do hit the wordpress url I find that I can’t […]

Can't get network statistics, Docker Remote API v1.22

I’ve been trying to fetch statistics from Docker containers using Docker’s Remote API (Docker version 1.10.3, API version 1.22). Everything seems to be fetched on all my containers except for network statistics. I suspect this is related to the network configuration on my hosts (i.e. the machines where Docker and my containers are running). Each […]

Exposing ipv6 ports in docker containers

I have an application which needs to listen on ipv6 for a specific port. I have exposed it in the docker file, and I’m running the docker engine with DOCKER_OPTS=”–ipv6″, but I can’t get docker to properly map the ports over ipv6. Port shows up when using docker inspect {name} (see below for output – […]

Slow network in Docker container after OpenShift install

After installing CentOS 7 VM in Google Cloud (n1-standard-2) with CentOS’ own Docker packages (docker-1.10.3-44) the network performance is as expected. Downloading a 100MB file from within a Docker container with wget takes 18 secs. However if the same node is part of an OpenShift Origin (1.1) installation (with default network settings wherever applicable), the […]

Forwarding traffic between two interfaces

I need to establish routing from my vpn to docker interface. Here’s what i tried : echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING –out-interface ppp0 -j MASQUERADE iptables -A FORWARD –in-interface docker0 -j ACCEPT iptables -A FORWARD -i ppp0 -o docker0 -m state –state ESTABLISHED,RELATED -j ACCEPT But it did not work for […]

docker fails to mount from CIFS mounted host directory

My setup is as follows: on the host machine I have cifs share mounted and working fine -> I can read/write etc at mnt/mydir. I am trying to mount this directory when running my docker container using -v /mnt/mydir:/mnt/mydir. The mounting itself seems to go just fine and even when I use docker inspect the […]

Issues with network traffic from docker

I am running this in an Ubuntu Docker instance: while true ; do echo -n “hello” | nc -w 0 -u “127.0.0.1” 50000 sleep 1 done And I am running this on the host that runs Docker: import socket import threading import time SOCK_BUFSZ = 4096 def udp_server(quit_flag): udp_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udp_sock.bind((‘127.0.0.1’, 50000)) counter […]

docker container interface not being attached to docker0 bridge in coreos

I just installed a coreos vm. When I create a container inside it with –net bridge, I donot see the interface created connected to the bridge. So the container has no connectivity. How do i go about debugging what is wrong? Or has anybody seen this before. I have tried deleting the docker0 bridge and […]

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