The easiest way to get started with Envoy is by using the pre-built Docker images. Envoy is designed to be highly configurable, with APIs for dynamic configuration and a JSON/YAML configuration format for static configuration.
To get it working, you’re going to need to create your own Docker image with your own Envoy configuration. Create a
Dockerfile that uses the latest Envoy images:
FROM envoyproxy/envoy:latest RUN apt-get update COPY envoy.json /etc/envoy.json CMD /usr/local/bin/envoy -c /etc/envoy.json
envoy.json configuration file. Here is a simple, non-production example
you can use that proxies incoming requests to Google.com. Note you may have to modify the listener to listen to
0.0.0.0 instead of
127.0.0.1 for this to work locally.
Build the Dockerfile:
docker build -t envoy:v1 .
Run the image, binding localhost port 8080 to the listener on port 10000 specified in the
docker run -d -p 8080:10000 envoy:v1
Test the image with
Congratulations! You should receive a bunch of HTML from Google.com, proxied via Envoy.
- Read the Envoy documentation