Question: I am trying to execute the container named **redis** which is running right now.But the error `Could not connect to Redis at redis:6379: Name or service not known`. Any one please hell me to figure out the issue and fix it.

Answer: 
This is because both the containers are not in same network, Add a network property inside service name and make sure its same for both

```
    redis:
      networks:
        - redis-net

```
Try below command

```
src/redis-cli -h localhost -p 6379

```