I'm using Docker for Mac and for some reason the example proxy in examples/front-proxy cannot bind to 0.0.0.0:80 inside the container.
front-envoy_1 | [2020-06-08 21:04:27.772][7][critical][main] [source/server/server.cc:100] error initializing configuration '/etc/front-envoy.yaml': cannot bind '0.0.0.0:80': Permission denied
docker run --rm -p 80:80 nginx works fine.
So it makes me think something鈥檚 wrong with the docker-compose config. I unfortunately don't know enough to contribute.
Hum, I think all examples that bound to 80 (and other privileged ports) need to be updated since https://github.com/envoyproxy/envoy/pull/11323
Meanwhile:
environment:
- "ENVOY_UID=0"
CMD command runs with envoy user because of this configuration. I tried adding to USER root to Dockerfile and user: root to docker-compose.yaml, but it didn't work because of this entrypoint.
If you are add to ENVOY_UID=0 to environment, you can run as root. Also see, https://github.com/envoyproxy/envoy/blob/e8a2d1e24dc9a0da5273442204ec3cdfad1e7ca8/ci/docker-entrypoint.sh#L25
CMD command runs with envoy user because of this configuration.
its the entrypoint which changes the user.
@mattklein123 would you like me to PR to update the examples that expose 80 ?
Sure any fixes to improve the examples appreciated.
Most helpful comment
Hum, I think all examples that bound to 80 (and other privileged ports) need to be updated since https://github.com/envoyproxy/envoy/pull/11323
Meanwhile: