How to change the default IP address of docker bridge adapter?

+1 vote

Hi Guys,

I am new in docker. Whenever I launched a container it gets ip from bridge adapter and the default gateway is But I want to change the default gateway address. How can I do that?

May 11 in Docker by akhtar
• 25,030 points

edited May 30 by MD 771 views

1 answer to this question.

0 votes


You can reconfigure the default bridge network by providing the bip option along with the desired subnet in the daemon.json (default location at /etc/docker/daemon.json ) file as follows.

$ vim /etc/docker/daemon.json
  "bip": ""

Then restart the docker daemon as root.

$ systemctl restart docker

Hope this will help.

answered May 11 by MD
• 56,480 points

Related Questions In Docker

0 votes
1 answer

How to obtain the Docker container's IP address from the host?

This can be done by executing the ...READ MORE

answered Jul 16, 2018 in Docker by Sophie may
• 10,100 points
0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 10,100 points
0 votes
2 answers

How can I inspect the file system of a failed `docker build

Failed command is a build that has ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 6,980 points
0 votes
1 answer

Docker, how to get container information from within the container?

I've found out that the container id ...READ MORE

answered Jul 31, 2018 in Docker by Kalgi
• 51,950 points
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,640 points
0 votes
1 answer

How to find a Docker container IP address from the command line?

Hi@akhtar, You can use the docker inspect command ...READ MORE

answered Sep 4 in Docker by MD
• 56,480 points
0 votes
1 answer

How to make a port available to services outside of Docker?

Hi@akhtar, By default docker containers works in a ...READ MORE

answered May 5 in Docker by MD
• 56,480 points