There are some other posts in the forum that have examples on how to do this (controlling the network interface from within the container), for example this post. Either Connman (the network manager in resinOS 1.x) and NetworkManager (the one used in resinOS 2.x) can be controlled over dbus.

In general, network configuration within the container is precarious and have a lot of edge cases. What sort of use case you have in mind for this, if you don’t mind my asking?

Hi there - the use case is a UI that manages the whole device, along with the services we have running on it - part of the admin is device ip/dhcp, hostname, wifi, etc.

We cant use dbus as we’re running under a non-root user and get security exceptions, see my other post on this - and I’d prefer to use standard well-documented linux commands if possible! I’m opening an ssh from the container to the host, and will provide (this one special, locked-down container) an ssh key once I’m on a prod resin.