I want to see if the running redis-server container status. So i want to execute info in a redis shell and see if the redis slave is in sync with the remote redis master.
My docker-compose file lists the redis as follows:
placements-store:
image: redis:3.0
command: redis-server ${REDIS_OPTIONS}
ports:
- "6379:6379"
Running docker-compose ps I can see it the container is up and running:
app_placements-store_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
I tried to execute:
docker-compose run --rm redis-cli
And got:
ERROR: No such service: redis-cli
I think this is understandable since there's no redis-cli container. I'm trying to tag along to the running redis-server instead but don't have any idea how to do that.
UPDATE
I can view the logs by executing:
docker-compose logs -f --tail 500 placements-store
And I do get some information like below, but I'm looking for more information and something that I can more easily control from the outside:
placements-store_1 | 1:S 06 Feb 19:16:35.427 * Connecting to MASTER mo-api.mydomain.com:6379
placements-store_1 | 1:S 06 Feb 19:16:35.589 * MASTER <-> SLAVE sync started
placements-store_1 | 1:S 06 Feb 19:16:35.889 * Non blocking connect for SYNC fired the event.
placements-store_1 | 1:S 06 Feb 19:16:36.189 * Master replied to PING, replication can continue...
placements-store_1 | 1:S 06 Feb 19:16:36.790 * Partial resynchronization not possible (no cached master)
placements-store_1 | 1:S 06 Feb 19:16:37.091 * Full resync from master: 5ada1d8c65fd49d67d931bea66530a169ce83a40:29442
placements-store_1 | 1:S 06 Feb 19:16:37.145 * MASTER <-> SLAVE sync: receiving 60 bytes from master
placements-store_1 | 1:S 06 Feb 19:16:37.145 * MASTER <-> SLAVE sync: Flushing old data
placements-store_1 | 1:S 06 Feb 19:16:37.145 * MASTER <-> SLAVE sync: Loading DB in memory
placements-store_1 | 1:S 06 Feb 19:16:37.145 * MASTER <-> SLAVE sync: Finished with success