kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

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

Open KeeProMise opened this issue 1 year ago • 4 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

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?

  • [X] I'm willing to submit a PR!

KeeProMise avatar Apr 09 '23 13:04 KeeProMise

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

git-hulk avatar Apr 09 '23 14:04 git-hulk

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.

PragmaTwice avatar Apr 09 '23 14:04 PragmaTwice

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.

KeeProMise avatar Apr 10 '23 02:04 KeeProMise

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.

PragmaTwice avatar Apr 10 '23 03:04 PragmaTwice