mininet-wifi icon indicating copy to clipboard operation
mininet-wifi copied to clipboard

mininet-wifi & containernet - nested docker deployment option

Open andreasdotzler opened this issue 3 years ago • 3 comments

I would like to use the mininet-wifi and containernet and I prefer the nested docker deployment option. I tried https://github.com/ramonfontes/containernet and noticed the nested docker deployment option was removed from the README.md . As with the original containernet, I tried building the container image, but it fails.

Is there a general problem that prevents mininet-wifi and containernet from being deployed in a nested docker deployment? Or is there a chance it will work if I fix the build of the docker image?

andreasdotzler avatar Aug 16 '21 07:08 andreasdotzler

Well, I confess that I do not remember. Which error did you find?

ramonfontes avatar Aug 17 '21 10:08 ramonfontes

I am seeing errors with the ansible-playbook, I believe those might be related to ubuntu version, ansible version, and python version. If you can not remember a general problem, I will make an attempt to fix them and report back

Step 6/12 : RUN ansible-playbook -i "localhost," -c local --skip-tags "notindocker" install.yml
 ---> Running in 7443853e49c2

PLAY ***************************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [updates apt] *************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "No package matching 'apt-get update' is available"}

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1   

The command '/bin/sh -c ansible-playbook -i "localhost," -c local --skip-tags "notindocker" install.yml' returned a non-zero code: 2

andreasdotzler avatar Aug 24 '21 10:08 andreasdotzler

I was able to fix the docker build as shown in the PR https://github.com/ramonfontes/containernet/pull/2

I was able to execute the example in the docker container with

$ docker build containernet-wifi .
$ docker run --rm --name containernet-wifi -it --privileged --pid=host -v /var/run/docker.sock:/var/run/docker.sock -v /sys:/sys -v /lib/modules:/lib/modules --network=host containernet-wifi examples/containernet_wifi.py

The issues fixed are mostly about python3 and the recent changes to the upstream containernet are mostly about switching to python3. I believe rebasing on the latest version might fix those problems as well.

andreasdotzler avatar Aug 26 '21 09:08 andreasdotzler