Running Envoy in Docker
Boot Envoy with a minimal config and tour the admin UI.
The smallest possible Envoy
Envoy needs at least one config file to start. The absolute minimum is a config that opens nothing but the admin interface — Envoy's introspection / debug port. It's perfect as a "is this thing on?" smoke test.
Save this as envoy.yaml in any folder:
admin:
address:
socket_address:
address: 0.0.0.0
port_value: 9901
That's it. Eight lines. Envoy can boot on this.
Run it
The official image (envoyproxy/envoy) reads its config from
/etc/envoy/envoy.yaml. Mount your file there:
docker run --rm -it \
-p 9901:9901 \
-v "$PWD/envoy.yaml:/etc/envoy/envoy.yaml" \
envoyproxy/envoy:v1.31-latest
You should see Envoy's startup banner end with something like
starting main dispatch loop. That's the "ready" signal.
The image bakes in a default config that proxies to httpbin.org. By
mounting our own file at the same path, we override it with the
admin-only config. You'll see this pattern in every lesson from here on.
The admin interface is your friend
Open http://localhost:9901 in a browser. You'll see a list of links —
this is the admin UI, and it's the most underrated debugging tool in the
whole project.
Click through these in order. Don't worry about understanding everything yet — we'll use them constantly in later lessons.
/— the index of all admin endpoints./server_info— version, hot-restart epoch, command-line flags. "Is this the version I think it is?"/config_dump— the full effective config Envoy is running. Bigger than you'd expect because it includes defaults./clusters— every cluster, every endpoint, with current health and per-endpoint stats. Single most useful page when something is broken./stats— every counter, gauge, and histogram Envoy emits./stats/prometheusis the same data in scrape format./listeners— what sockets Envoy is listening on.
Spend three minutes clicking around. Even with our minimal config you'll see how much Envoy exposes by default — that's a feature, not noise.
The admin interface lets you read config, change log levels, and even
trigger graceful restarts. Behind the firewall, on localhost only. Always.
In production, bind it to 127.0.0.1.
What you've actually proven
This lesson looks small but it pins down a lot:
- You have a working Envoy on your machine.
- You know how to mount a config file into the container.
- You know where the admin interface lives.
- You've seen — even if you don't understand them yet — the endpoints you'll use to debug everything in the next 13 lessons.
Next up: we'll add a listener that actually accepts traffic and does something useful with it.
Which port does the Envoy admin interface listen on by default in our examples?