> For the complete documentation index, see [llms.txt](https://www.trentbauer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.trentbauer.com/guides/other-guides/docker-compose/map-hostname-to-container.md). Agents can also search and read this documentation through its [MCP server](https://www.trentbauer.com/~gitbook/mcp).

# Map Hostname to a Container

Easy - Use variable `{hostname}`&#x20;
