containerlab icon indicating copy to clipboard operation
containerlab copied to clipboard

Dockerfile for d-in-d containerlab

Open hellt opened this issue 1 year ago • 2 comments

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

hellt avatar Feb 09 '24 08:02 hellt

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

robertvolkmann avatar May 07 '24 05:05 robertvolkmann

Thanks @robertvolkmann Appreciate the help

hellt avatar May 07 '24 06:05 hellt

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 avatar Jul 26 '24 12:07 FloSch62

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

FloSch62 avatar Jul 26 '24 16:07 FloSch62

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

hellt avatar Aug 13 '24 12:08 hellt