apache / kvrocks

Apache Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
https://kvrocks.apache.org/
Apache License 2.0
3.47k stars 450 forks source link

Is it possible to add redis-cli to the docker image so that it can be downloaded and used immediately. #1376

Open KeeProMise opened 1 year ago

KeeProMise commented 1 year ago

Search before asking

Motivation

I downloaded docker Mirror, found that you need to install redis-cli yourself,s it possible to add redis-cli to the docker image so that it can be downloaded and used immediately.

Solution

No response

Are you willing to submit a PR?

git-hulk commented 1 year ago

This sounds good to me. cc @torwig @PragmaTwice @ShooterIT

PragmaTwice commented 1 year ago

I do not think it is necessary. The docker image we provide is only for starting a kvrocks service, not a redis client.

You can build a docker image only for redis-cli, find one in the docker hub, or use redis-cli in your host environment.

BTW, we do not encourage anyone to modify the entrypoint of the docker image and use other binaries in the image. It is literally only for one binary, i.e. bin/kvrocks.

KeeProMise commented 1 year ago

We don't need to modify the entrypoint, I think redis-cli can be added to the bin directory, so that for some people who are new to the database, it is very convenient (enter the docker container to run bin/redis-cli) to execute some redis commands to interact with the database. Moreover, the same is true for mysql, redis, iotdb, etc. that I know.

PragmaTwice commented 1 year ago

When you "enter" the docker container via shell (docker exec), you changed the entrypoint of the docker image from bin/kvrocks to bash (or the posix shell, whatever).

We do not expect users to do this.

Another thing is that, seems there is no package in ubuntu for a single redis-cli.