> For the complete documentation index, see [llms.txt](https://docs.proxyman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.proxyman.com/debug-devices/docker.md).

# Docker

### 1. Capture traffic from your Docker Container

By default, Proxyman can capture all traffic that you access from your Docker Container if you access it from your Mac Devices.

To elaborate, here is the sample Docker Container:

1. Set up a simple HTTP Server by NodeJS + Express. Then Dockerizing it. You can find it at <https://nodejs.org/en/docs/guides/nodejs-docker-webapp/>
2. Makes sure we expose your server via port 8080.
3. You can verify it by opening <http://localhost:8080> on Safari.

### 2. Capture traffic inside Docker Containers

Read more at <https://github.com/ProxymanApp/Proxyman/issues/419#issuecomment-1059096490>

### 3. Alternative Solution:

1. Add docker-compose.proxyman.yml. Replace \<php8.1-fpm-xdebug> with your service

```yaml
version: '2'
services:
  php8.1-fpm-xdebug:
    environment:
      HTTP_PROXY: host.docker.internal:9090
      HTTPS_PROXY: host.docker.internal:9090
      http_proxy: host.docker.internal:9090
      https_proxy: host.docker.internal:9090
```

2. Start the Docker:

`docker-compose -f docker-compose.yml -f docker-compose.proxyman.yml up -d`

Ref: <https://github.com/ProxymanApp/Proxyman/issues/1712#issuecomment-1642279537>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.proxyman.com/debug-devices/docker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
