How can I edit /etc/default/docker config?

I would like to use own bridge IF which is br0.
I don’t wanna use docker0 bridge IF.
so, I did this to be used br0 bridge on docker instead of docker0 bridge.

echo 'DOCKER_OPTS="-b=br0"' >> /etc/default/docker

but, it did not work.

Does anyone know how to use own bridge on Docker System.

this is my nixos-config about docker

  virtualisation = {
    docker = {
      enable = true;
#      enable = false;
#      enableNvidia = true;
      extraOptions = ''

/etc/default/docker won’t work because NixOS is systemd-based. Maybe try appending -b=br0 after --insecure-registry

1 Like

Thank you for your reply.

I tried -b=br0 after --insecure-registry
but, it did not work…

How exactly have you added it to that field?

Remember that it is space separated string, not newline. Therefore I think using a double-single-quoted string there is misleading.

Also I prefer long switches in scripts and config for readability.

1 Like

extraOption = “–insecure-registry -b=br0”;

It worked !!

Thank you very much.