monoceros tunnel
Opens a TCP tunnel from the host into the container - for DB clients, ad-hoc port forwards, or any tool that needs a container-internal port. It is a foreground process: Ctrl+C stops the tunnel.
monoceros tunnel <name> <service-or-port> [--local-port=<n>] [--local-address=<addr>]<service-or-port> is a service name from the yml (postgres), a
service:port pair for an explicit in-container port (rustfs:9001), or a bare
in-container port that resolves to the workspace (8080).
Examples
Section titled “Examples”# Reach the Postgres service from a host DB client (localhost:5432)monoceros tunnel acme postgres
# A bare port, bound to a different local port when 5432 is busymonoceros tunnel acme 5432 --local-port=55432
# Expose on the LAN instead of loopback onlymonoceros tunnel acme postgres --local-address=0.0.0.0Options
Section titled “Options”--local-port=<n>- host port the tunnel listens on. Defaults to the same as the in-container port (e.g.postgres→5432); set another when that is busy.--local-address=<addr>- host interface to bind. Defaults to127.0.0.1(loopback, same machine only); pass0.0.0.0to reach it from other devices on your network.
Behavior
Section titled “Behavior”- Foreground. The tunnel lives only as long as the command runs; Ctrl+C closes it.
- Raw TCP, not HTTP. For browser-facing HTTP services use the proxy
hostnames from
monoceros portinstead.
See also
Section titled “See also”- Proxy and tunnels - tunnels vs. proxy routing.
monoceros port- HTTP hostnames via the proxy.monoceros share- expose a browser-facing app to the LAN (phone, other devices).