From f416fbb3966a9965611d0fd9aca4c32a26d0babc Mon Sep 17 00:00:00 2001 From: ColinChamber <95634254+ColinChamber@users.noreply.github.com> Date: Fri, 5 May 2023 21:12:19 +0800 Subject: [PATCH] Add redis cli to the docker image (#1415) --- Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 543195f76e2..0c75d510720 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,12 +23,19 @@ ARG MORE_BUILD_ARGS ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt update && apt install -y git gcc g++ make cmake autoconf automake libtool python3 libssl-dev +RUN apt update && apt install -y git gcc g++ make cmake autoconf automake libtool python3 libssl-dev curl WORKDIR /kvrocks COPY . . RUN ./x.py build -DENABLE_OPENSSL=ON -DPORTABLE=ON $MORE_BUILD_ARGS +RUN curl -O https://download.redis.io/releases/redis-6.2.7.tar.gz && \ + tar -xzvf redis-6.2.7.tar.gz && \ + mkdir tools && \ + cd redis-6.2.7 && \ + make redis-cli && \ + mv src/redis-cli /kvrocks/tools/redis-cli + FROM ubuntu:focal RUN apt update && apt install -y libssl-dev @@ -37,6 +44,9 @@ WORKDIR /kvrocks COPY --from=build /kvrocks/build/kvrocks ./bin/ +COPY --from=build /kvrocks/tools/redis-cli ./bin/ +ENV PATH="$PATH:/kvrocks/bin" + VOLUME /var/lib/kvrocks COPY ./LICENSE ./NOTICE ./DISCLAIMER ./