Can’t connect to docker redis container from the host using StackExchange.Redis

Not sure if it’s the issue with connection string or my docker image. Running docker container ls I see

57cb0c982c76 redis "docker-entrypoint.s…">6379/tcp

The port seems to be mapped to the outside. I tried to run

docker run -d -P redis:alpine

with this and other different variations of parameters, and using StackExchange.Redis C# driver and it times out. Connection string looks like that:


(no password). What am I doing wrong?

Source: StackOverflow