Ezreal
April 1, 2020, 10:32am
1
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 = ''
--insecure-registry 192.168.1.1:5000
'';
};
};
/etc/default/docker
won’t work because NixOS is systemd-based. Maybe try appending -b=br0
after --insecure-registry 192.168.1.1:5000
?
1 Like
Ezreal
April 1, 2020, 1:40pm
3
Thank you for your reply.
I tried -b=br0
after --insecure-registry 192.168.1.1:5000
but, it did not work…
NobbZ
April 1, 2020, 6:07pm
4
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
Ezreal
April 4, 2020, 10:03am
5
extraOption = “–insecure-registry 192.168.1.1:5000 -b=br0”;
It worked !!
Thank you very much.