Passing env variables to Docker container

I have docker image of spring java app, that expects REDIS_HOST and REDIS_PORT as environment variables, or defaults to localhost.
I’ve created the blueprint for my service and redis service, and specified envVars part for my service that references redis.
Render creates services correctly.

But when starting docker container for my service, REDIS_HOST uses localhost variable, as if env variable is not taken into account.

Is it possible to pass env variables to sevice created from docker image?


I’ve replied to the ticket you also opened, let’s keep the conversation in one place (on the ticket). Then you can update this post when we get to a solution.


It’s my fault!
Environment variables are accessible for docker made services!

I’ve changed the spring version in my project from version 2, which I’ve used before, to the newest version 3.

Spring team migrated redis properties from spring.redis. to

After using correct properties, my service is connecting to redis correctly!

Thank support team!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.