How do I use redis-cli?


How do I gain access to redis-cli? I am trying to disable redis persistence using the following command (which worked in 1.0): echo "CONFIG SET save ''" | redis-cli -x

I am using the container as follows:

My circle.yml starts off as follows:

version: 2.0
executorType: docker
  - image: desiringgod/circle-ci:0.6
      - PGHOST=localhost
      - PGUSER=ubuntu
  - image: postgres:9.5.2
      - POSTGRES_USER=ubuntu
      - POSTGRES_DB=circle_test
  - image: redis:2.8.6


Just install redis-tools with apt. Your command still works verbatim. By default, redis-cli connects via TCP. Here’s an example:

version: 2
      - image: ubuntu:14.04
      - image: redis:2.8.19
    working_directory: /project
      - run: |
          apt-get update && apt-get install -y redis-tools
          echo "CONFIG SET save ''" | redis-cli -x


I have the same issue, but with Postgres instead. when I use the ubuntu:14.04 docker image, I can no longer run npm install. why is that?


Well node isn’t installed so you’d have to do that. I highly recommend building your own image.


So when question @rohara is, how does circleci know to run the apt-get update.... redis-cli -x command in the redis image and not the ubuntu image?


It doesn’t. It’s not even running that from what I can tell.

Just go look up the Redis image source:

Everything is open source.