srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.45k stars 247 forks source link

Dockerfile for d-in-d containerlab #1872

Closed hellt closed 3 weeks ago

hellt commented 7 months ago

Containerlab can successfully run in a d-in-d container and it is a perfect wrapping for CI tasks.

We need to create and publish a d-in-d image that would have a matching release of containerlab installed inside.

Take clabernetes launcher dockerfile and strip it off of extra c9s stuff - https://github.com/srl-labs/clabernetes/blob/main/build/launcher.Dockerfile

robertvolkmann commented 4 months ago

@hellt I could work on it. Please assign me, if it make sense.

hellt commented 4 months ago

Thanks @robertvolkmann Appreciate the help

FloSch62 commented 1 month ago

Hi,

As it has been quite quiet here, I tried something myself: https://github.com/FloSch62/clab-dind

So far, I have tested it with SRL and SROS, and it works. I had significant problems with cgroups2 and overlay2, but the current version works. Do you have any suggestions for improvement? I still want to test some things, but I wanted to share what I have.

FloSch62 commented 1 month ago

Actually my repo is not "really" needed. With a little bit overhead the devcontainer for containerlab is already providing all it needs.

docker run -it --privileged --cgroupns=host ghcr.io/srl-labs/containerlab/clab-devcontainer:latest /bin/bash -c "sudo dockerd > /dev/null 2>&1 & bash"

should also work in any ci/cd action/pipeline

hellt commented 3 weeks ago

will close this for now. We can return to this if the existing clab-devcontainer image shows any deficiencies