how can docker connect to local redis server code example Example: run docker redis localhost docker run --name my-redis -p 6379:6379 -d redis:alpine