title | sidebarTitle | description | icon |
---|---|---|---|
Using Subtrace with Docker |
Docker |
Track requests in your Dockerized app with Subtrace. |
docker |
If your app runs in a Docker container, you can use Subtrace to monitor all its requests. Here's how you can get started:
Make the following change to your `Dockerfile` to install and use Subtrace in your app's Docker image:- CMD ["node", "./app.js"]
+ RUN curl -fsSLO https://subtrace.dev/download/latest/$(uname -s)/$(uname -m)/subtrace && chmod +x ./subtrace
+ CMD ["./subtrace", "run", "--", "node", "./app.js"]
- docker run -t -p 3000:3000 node-app
+ docker run -t -p 3000:3000 --cap-add=SYS_PTRACE node-app