{
  "title": "View docker container logs",
  "messages": [
    {
      "role": "user",
      "content": "so cortex runs in a docker container. how can i view the logs from the container as it is running?"
    },
    {
      "role": "assistant",
      "content": "Good question — super common need when debugging a live service.  \nLet’s go step-by-step (short version first):  \n\n---\n\n### 🪵 To view live logs from a running container\n\n```bash\ndocker logs -f <container_name>\n```\n\n**Example:**\n```bash\ndocker logs -f cortex\n```\n\n- `-f` = “follow” (like `tail -f`) so it updates in real time.  \n- Press **Ctrl + C** to stop watching.  \n\n---\n\n### 🧠 If you’re not sure of the container name\n\nRun:\n```bash\ndocker ps\n```\nThat’ll show all running containers. Look under the **NAMES** column for your Cortex container.\n\n---\n\n### 🧰 Optional extras\n- Show **timestamps**:\n  ```bash\n  docker logs -ft cortex\n  ```\n- Limit to the **last 100 lines**:\n  ```bash\n  docker logs --tail 100 -f cortex\n  ```\n\n---\n\nDo you want me to show you how to do this from **Portainer’s UI** too (click-to-view logs instead of terminal)?"
    }
  ]
}