Greetings @dleberfinger,
Managing network inside of a container has a lot of varied approaches from what I’ve seen. I don’t think there’s single best practice solution I can prescribe for every situation. It’s typically a use-case dependent kind of approach from what I’ve found with other customers.
Now if you want to try and use nmcli
inside a container, this has worked for me in the past: Change the apalis imx6 static IP address from inside a container
The main thing I see here compared to your setup is needing to bind-mount /var/run/dbus
into your container. This should allow the nmcli
tool inside the container to communicate with the NetworkManager that is running outside of the container. This should get basic nmcli
working.
You may also need to give your container extra privileges or permissions depending on the kind of network tasks you end up doing. As I said, it all depends.
Best Regards,
Jeremias