Okay so.

I have a docker instance with 2 running apps. Normally one of them is just a proxy to the other one, so a http req to app0 is redirected to app1 and the same with response.

This works perfectly on bare machine, i can just rewrite the ip in the config file and it works. Now my boss decided that yeah docker is absolutely needed for this software so i have to containerize it.

Thing is docker seems to break local ips? I cant use localhost/, nor assigned ip. Is there a way i can debug this, or what should i look up??? Im lost, this is devops afaik and im far from devops.

  • 3
    use Docker-compose, set the rev-proxy to network-mode host.
  • 0
    +1 on docker compose

    For the no compose solution, if they're both on the same host, you can target{port} and the bridge network should do the rest.

    Also, if you're committed to docker as an org, you should also look at swarm for upper envs and service discovery.
Add Comment