I am preparing a test automation which require me to install network manager so that the code api(which uses python3-networkmanager) could be tested.
In the docker file, I tried installing:
apt-get install dbus
network-manager
start receiving error:
networkmanager.systems do not have hostname property.
I looked for solutions, but appears that will require:
- Privilege user (cannot use privilege user, project requirement)
- Reboot after installing same. (in docker, hence, can’t reboot)
This leaves me with an only option for mocking debian networkmanager that can communicate with python3-networkmanager.
Trying to figure out, how I can mock same?
2
Answers
worked for me.
I would like to contribute as I had to spend some time getting it to work.
Inside the
dockerfile
you have to add:Also, I added a script to start the network manager:
Then in the Dockerfile you have to call this start script at the end:
Now you can build your container and run it like this:
For me, it is enough to work with OrangePi and Docker without a privileged container.