Containerlab Tips

docker image ls displays your docker image repo:

docker container ls displays running containers. Once your topology is finished launching, you should see all contianers as healthy. Occasionally, a node may fail to boot properly. In that case, I just stop the containerlab topology entirely and restart it.

You can use docker logs clab-<topology name>-<node name> -f to watch logs as a node boots up. For example:

docker logs clab-russo-spv4-XR1 -f

In general, telnet <mgmt ip> 5000 will allow you to access a node's console port. Use ctrl+], quit to exit.

Ensure you have transfered config files to all nodes before running labs on XR nodes. If your config file does not exist on the node, you will commit and replace a blank config and lose access to the node. For example, if you enter 'y' here, you will lose access:

In MTPutty, you can use ctrl+tab and ctrl+shift+tab to navigate between tabs without a mouse.

I use docker system prune periodically to safely free up disk space. This clears out build cache and stopped containers.

containerlab destroy -a will destroy any running topology.

containerlab inspect --all will show all running topologies.

Last updated