I am new to docker . I am trying to access a spring boot service via Zuul url using docker containers. I have containerized the db, the spring boot service, eureka server and the Zuul gateway. Without dockerization, zuul is able to proxy the request to desired service using the host url.
P.S. Both the spring boot service and the zuul gateway are getting registered to the eureka server in docker. Below is the configuration of Zuul gateway:-
zuul.routes.vehicle.url=http://hostname:9010
I have also tried,
zuul.routes.vehicle.serviceId=vehicle (i.e. eureka serviceId)
zuul.routes.vehicle.stripPrefix=false
with:-
ribbon.eureka.enabled=true
Both doesnot work in my case. I can see the PreFilter and Postfilter of Zuul getting hit via logs, but the forwarding is not happening.
I brought up the Zuul service like this:
docker run -it -p 9001:9001 --name zuulservice --link vehicleservice -d zuulservice bash
I am trying to access the resource like this:
http://localhost:9001/vehicle/resource
Am I missing something?? I am using Docker 17.12