Tag: networking

How to create docker containers with the same internal IP address?

I have an environment where I need to run some external software into Docker containers. This software is trying to connect to our product by specific IP address – let’s say – and this address is fixed and cannot be changed. Moreover, host IP address must be also set to specific IP – let’s […]

pip install doesn't work correctly in docker

Question i can’t install any package during building an image. pulling from docker hub is OK, but problems occurred when docker try to use network to build an image. for example, if i try to run: $ docker build -t sample-image:latest . … and the Dockerfile that used by above command has following line: RUN […]

specifying network ip docker

I’m using docker to deploy a zookeeper ensemble and am running into a problem which I think is due to the proxy docker uses for localhost. Edit: the issue is that while I am closing connections, they are left in TIME_WAIT I want to change the ip for my containers to something else in the […]

Is there a way to rename network interfaces in Docker swarm?

When using Docker swarm mode and exposing ports outside, you have at least three networks, the ingress network, the bridge network and the overlay network (used for internal cluster communications). The container joins these networks using one of eth0-2 (randomically each time) interfaces and from an application point of view is not easy to understand […]

How to change ip address range of docker swarm ingress network

I use a docker swarm 1.13.1, and when I init the docker swarm or join to docker swarm sometimes it creates a docker_gwbridge network in a “” subnet. But my computer subnet is in the same range, so when it initializes this network the docker swarm host machine becomes inaccessible from my computer. So my […]

Why do ports need to be specified twice separated by a colon?

A lot of times, I see ports described twice with a colon like in this Docker Compose file from the Docker Networking in Compose page: version: “3” services: web: build: . ports: – “8000:8000” db: image: postgres networks: default: # Use a custom driver driver: custom-driver-1 I’ve often wondered why the “8000:8000” and not simply […]

How can I expose a Docker container port only to localhost so that it is also accessible via an ssh tunnel?

Hopefully straightforward. I know how to bind to the host only with -p$HOSTPORT:$CONTAINERPORT The issue I’m encountering is that doing this preventing me from accessing the mapped host port over an ssh tunnel to the docker host. Is there way to do this without having to block the port upstream from the docker host […]

Forward port from docker bridge to local network?

I have a container running on Docker. I can access it via (IP is the docker0 bridge). is available to my PC but none of the other devices on the local network. I want to make port 8140 (on docker bridge) available to my local network. How can I forward a port from […]

Communicate two containers in docker with netcat

I want to communicate two containers in docker, I’m using netcat for the test. First I have created the Dockefile: FROM ubuntu WORKDIR /root RUN apt-get update && apt-get install netcat iputils-ping -y And added the image with: docker build . -t ubuntu_netcat Also I have created a new network: docker network create –driver bridge […]

Error response from daemon: network bridge not found

I just got these messages after starting my docker service on ubuntu 14.04, and trying to starting the postgres container. $ docker start codeslave-postgres –> starting my container $ Error response from daemon: network bridge not found $ Error: failed to start containers: codeslave-postgres I was try to stop and restart docker service and also […]

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