I have created a console application in .net core to publish and subscribe message in Redis.
I have given connection string 127.0.0.1:6379, localhost:6379 when I run locally in my system it works.
but when I create docker image and run in docker it gives me an error
in docker image i have used only to publish code and entry point to dotnet command.
and not exposing any port.
StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s). UnableToConnect on localhost:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 0s ago, last-write: 0s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 0s ago, v: 188.8.131.5289
i tried to search in google , but did not get any useful information