What is the correct way in Google Container Optimised OS to do the equivalent of --network=container:<my_container>
to route all traffic from one container to another? I'm attempting to route all traffic (or as a fallback just HTTP/HTTPS) to another container.
I'm unsure if there's a better way to achieve this than the following options i've some up with:
- Running the
docker run ...
command manually inside the container - Using cloud-init to automatically run the
docker run ...
command with the network flag set - Runtime forwarding (HTTP) traffic to the second container using a proxy to fire over all connections
Each of these solutions comes with a bunch of additional problems, is there a better solution to make this work?