> ## Documentation Index
> Fetch the complete documentation index at: https://docs.subtrace.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Subtrace with Docker

> Track requests in your Dockerized app with Subtrace.

If your app runs in a Docker container, you can use Subtrace to monitor all its
requests. Here's how you can get started:

<Steps>
  <Step>
    Make the following change to your `Dockerfile` to install and use Subtrace
    in your app's Docker image:

    ```diff theme={null}
    - CMD ["node", "./app.js"]
    + RUN curl -fsSL https://subtrace.dev/install.sh | sh
    + CMD ["subtrace", "run", "--", "node", "./app.js"]
    ```
  </Step>

  <Step>
    Run your Docker container as you normally would, but add `--cap-add=SYS_PTRACE`:

    ```diff theme={null}
    - docker run -t -p 3000:3000 node-app
    + docker run -t -p 3000:3000 --cap-add=SYS_PTRACE node-app
    ```

    <Expandable title="example output">
      <img className="rounded-xl" src="https://mintcdn.com/subtrace/qpTd5I2XwvFUV3U2/images/docker-link.png?fit=max&auto=format&n=qpTd5I2XwvFUV3U2&q=85&s=781906583763887f8b725fba4edb3921" width="1436" height="638" data-path="images/docker-link.png" />
    </Expandable>
  </Step>

  <Step>
    That's it! Open the `subt.link` URL in your browser to see your app's requests
    show up in real time:

    <img className="rounded-xl" src="https://mintcdn.com/subtrace/qpTd5I2XwvFUV3U2/images/subt-link-example.png?fit=max&auto=format&n=qpTd5I2XwvFUV3U2&q=85&s=10f6aa739a03934a82f5bd07ec08b398" width="3015" height="1598" data-path="images/subt-link-example.png" />
  </Step>
</Steps>
