Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Docker image on bridged or custom docker network #2124

Open
Cilenco opened this issue Dec 8, 2023 · 0 comments
Open

Use Docker image on bridged or custom docker network #2124

Cilenco opened this issue Dec 8, 2023 · 0 comments

Comments

@Cilenco
Copy link

Cilenco commented Dec 8, 2023

Describe the bug
When running OTBR in a docker container as suggested in the official guide Google Home (and other apps) cannot connect to it.

When starting the docker container with:

docker run --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" -p 8080:80 --dns=127.0.0.1 -it --volume /dev/ttyACM0:/dev/ttyACM0 --privileged openthread/otbr --radio-url spinel+hdlc+uart:///dev/ttyACM0

no apps can connect to the border router. However if I execute these command beforehand on the host:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
sudo sysctl -w net.ipv4.conf.all.forwarding=1 
sudo sysctl -w net.ipv6.conf.all.forwarding=1

and then start the container like this

docker run --net=host --dns=127.0.0.1 -it --volume /dev/ttyACM0:/dev/ttyACM0 --privileged openthread/otbr --radio-url spinel+hdlc+uart:///dev/ttyACM0

everything works as expected and apps can connect to the border router. Because I already have a container using port 80 on my host machine I would like to use a custom docker network. I'm not sure how to do that as the Thread communication requires IPv6 and also UDP packets for the DNS discovery.

To Reproduce
Follow the Docker tutorial linked above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant