Home > Enterprise >  setup proxy to docker containers from java application
setup proxy to docker containers from java application

Time:10-05

Need help with technical solution.

I have java (spring boot) application which may start docker container. Application assign ID and port to each container. That port is used as separate UI. ID is used to stop container.

For now, application work with 443 secured port, while each container open it own port in a range 19000-19100.

Is it possible to setup something like proxy server in application, verify request and then forward it to container?

Let's say, instead of myhost.com:19000 I want to use myhost.com/container/{containerId}?

I'm thinking about rest template or feign client, but not sure how it will behave with websockets. Any thoughts? Existing tools or libraries?

CodePudding user response:

Take a look at Spring Cloud Netflix Zuul.

I am working on a project where we use this to proxy requests from frontend to a service which handles persistence processes.

Maybe it will help you achieve what you are looking for.

  • Related