I wrote a custom filter for envoy, and wish to build a version of Istio that allows me to use that custom filter. I tried following this blog post but ran into trouble on the make docker
phase.
Looking in istio/bin/init.sh
, it seems that if we set the variable USE_LOCAL_PROXY=1, then by default the build script should look for the envoy binary at ../proxy/bazel-bin/src/envoy/envoy
. The only problem is that the init.sh script is run as an arg in a docker run
command, where the image is specified by this dockerfile. Therefore, the filesystem on the container running the init.sh file does not have access to whatever code or binaries I put in the …/proxy directory on my machine.
I tried downloading the Dockerfile, and editing it to copy in my own envoy binary into the build container. I was able to build a copy of the build-tools container and do a hack on istio/common/scripts/run.sh
to use my local image, but the problem is that my envoy binary was compiled for MacOS, not the OS that the istio build-tools docker container simulates.
I also tried unsuccessfully to copy the envoy code into the container and build it from scratch within the container (although I was able to do so on my own Mac box).
Now the only solution I can think of is the gross process of cross-compiling my envoy code for linux, editing the Dockerfile above to copy in the binary, hacking the run.sh file to use the resulting image, and then running make docker
using the resulting setup.
I feel like I must be missing something blindingly obvious here; it can’t possibly be this difficult/clumsy to build a version of istio using a custom envoy binary. What gives?
Thank you for your help!
(Note—I was successfully able to compile my envoy binary using two methods: Just extending the envoy source code, for example see this github repo. The second way was by modifying the istio proxy repo and compiling it, resulting in the envoy binary at proxy/bazel-bin/src/envoy/envoy
)