# Containerlab Tips

**docker image ls** displays your docker image repo:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F94bYzZP9gVxXewBZ0R2L%2Fimage.png?alt=media&#x26;token=34f08681-50b3-453c-a0ca-f906e8ac0e74" alt=""><figcaption></figcaption></figure></div>

**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.

<figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FR7RTzUqoWKMFYthECNNo%2Fimage.png?alt=media&#x26;token=b1605102-26b3-4060-bed5-9afec8fb40e1" alt=""><figcaption></figcaption></figure>

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.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FFrTQbvUCicFtDZFlVn6q%2Fimage.png?alt=media&#x26;token=a0448e98-3cec-45cf-9f00-7fc95de4d247" alt=""><figcaption></figcaption></figure></div>

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:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FMffLzjWn9qO8mLL1Kgsa%2Fimage.png?alt=media&#x26;token=33c1194b-0dae-481b-81a6-d0768e6999f6" alt=""><figcaption></figcaption></figure></div>

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ccie-sp.gitbook.io/ccie-spv5.1-labs/containerlab-tips.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
