How to map docker container address to custom ‘redis://redis:6379’ host?

I am writing a celery application which needs to connect to redis at the host:
redis://redis:6379 – it has to be this specific has because of the way my other apps are connecting to redis.

I do the following:

# Install redis from docker hub
docker run -name redis -d redis

Then bind to local port:

docker run -d -p 6379:6379 redis

I know how to map it to localhost:6379 but how do i map it to the host redis://redis:6379?

Any ideas?

Source: StackOverflow