-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redis cli to nightly image #1415
Conversation
Dockerfile
Outdated
@@ -37,6 +37,10 @@ WORKDIR /kvrocks | |||
|
|||
COPY --from=build /kvrocks/build/kvrocks ./bin/ | |||
|
|||
ARG TARGETARCH | |||
COPY tools/redis-cli-${TARGETARCH} /usr/bin/redis-cli | |||
RUN chmod a+x /usr/bin/redis-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO if a user run docker build
towards this dockerfile in him/her device instead of CI, a fatal error will appear since there is no tools
dir.
So I think It is not a reasonable change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I want to emphasize my point: the dockerfile cannot have different behavior between built by a user and triggered in the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these conditional branches related to arch in the current changes is not necessary. You can just build redis-cli in the dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Dockerfile
Outdated
@@ -37,6 +44,9 @@ WORKDIR /kvrocks | |||
|
|||
COPY --from=build /kvrocks/build/kvrocks ./bin/ | |||
|
|||
COPY --from=build /kvrocks/tools/redis-cli ./bin/ | |||
RUN ln -s /kvrocks/bin/redis-cli /usr/bin/redis-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to add this symlink?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/kvrocks/bin is not in the PATH environment variable, so I created a symlink. Are you suggesting that I should either copy it directly to /usr/bin or add /kvrocks/bin to the PATH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the latter is better.
94a7371
to
44dc2c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @ColinChamber , merging... |
solve #1376
Hi @PragmaTwice
We have been working on improving kvrocks-operator recently and have found that many redis-operators use redis-cli for Kubernetes liveness probes. Although we can use commands like 'echo "PING" | nc localhost 6666', it can be a bit tricky. Additionally, redis-cli is more user-friendly for operations and makes it convenient to query service information within the container. In complex cloud network environments with audit policies, it is not possible for redis-cli from any node to connect to the redis-server
I pushed the image to my own repository and ran some tests.