Change default docker ip

Hi there,

I’m trying to configure HASS and Docker to use a different network than it’s default, because here in my work we have some equips using 172.17.x.x network and my default installation of docker and hassio are pointing to 172.30.32.1/23 (hassio) and 172.17.0.1/16 (docker), that way, i can’t find printers on this ip range to add to HASS.
Im using debian 11 and installed hass using this guide:

i followed this, but after restarting, everything goes back to default again:

Edit /etc/docker/daemon.json

{
“bip”: “10.0.0.1/24”,
“default-address-pools”: [
{ “base”: “10.0.0.0/16”, “size”: 24 }
]
}

Modify bip and base for what you want

From docker docs

Tried to edit /etc/docker/daemon.json but after restarting docker.service it returned an error code

What error code?

What you change and how? Post it

EDIT

I posted recommendation from post but maybe look at docs link i posted. When I just check I don’t see “default-address-pools” in example but so not sure it apply or is correct format. Error code would help figure out if format is cause or what error it see.

my etc/docker/daemon.json is like this:

{
“log-driver”: “journald”,
“storage-driver”: “overlay2”
“bip”: “10.0.0.1/24”,
}

sudo systemctl restart docker.service

Job for docker.service failed because the control process exited with error code.
See “systemctl status docker.service” and “journalctl -xe” for details.

sudo systemctl status docker.service

docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset>
Active: failed (Result: exit-code) since Wed 2022-10-05 10:10:04 -03; 24s >
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 4573 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/contain>
Main PID: 4573 (code=exited, status=1/FAILURE)

out 05 10:10:02 debianltorresha systemd[1]: docker.service: Main process exited>
out 05 10:10:02 debianltorresha systemd[1]: docker.service: Failed with result >
out 05 10:10:02 debianltorresha systemd[1]: Failed to start Docker Application >
out 05 10:10:04 debianltorresha systemd[1]: docker.service: Scheduled restart j>
out 05 10:10:04 debianltorresha systemd[1]: Stopped Docker Application Containe>
out 05 10:10:04 debianltorresha systemd[1]: docker.service: Start request repea>
out 05 10:10:04 debianltorresha systemd[1]: docker.service: Failed with result >
out 05 10:10:04 debianltorresha systemd[1]: Failed to start Docker Application >
lines 1-16/16 (END)

I think you had “,” in wrong spot.
You had it after bip entry but I think no “,” after bip entry and added after storage- driver entry is correct


{
“log-driver”: “journald”,
“storage-driver”: “overlay2”,
“bip”: “10.0.0.1/24”
}

Thank you very much, that was it.
You have to enter the BIP command in the first line, just as showed in docker documentation.
Changing the ip did the trick, now i can acess the whole network again as before installing docker.