Skip to content

Commit

Permalink
Add redis cli to the docker image (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinChamber committed May 5, 2023
1 parent ff715c5 commit f416fbb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ./
Expand Down

0 comments on commit f416fbb

Please sign in to comment.