Run this container in the same network as your Redis master (launch a container from the official redis image to have a Redis as master). Pass as EnvVar the master name (or container ip, if you didn't set a name to the master, which we highly recommend).
docker run -d --name slave1 --net redisnet -e MASTER_ADDR=master devopsbq/redis-slave:latest
Note: the default port for connecting to the master is 6379. You can change the port by setting the EnvVar MASTER_PORT. Also, this redis slave works on port 6379, but you can set the EnvVar SLAVE_PORT to change this behaviour.