Skip to content

Redis CLI access in Docker containers

To interact with a Redis instance running inside a Docker container, you must use the Docker CLI to execute the Redis client binary (redis-cli) within the container's environment.

Execution Command

The specific command requires the Docker exec instruction with the interactive (-it) flag, the container's ID or name, and the redis-cli process name.^[600-developer__docker__docker-compose__docker-redis.md]

docker exec -it <CONTAINER_ID> redis-cli

Context

This access method is typically used when the Redis service is defined and run within a Docker Compose configuration.^[600-developer__docker__docker-compose__docker-redis.md]

Sources

^[600-developer__docker__docker-compose__docker-redis.md]