Skip to content

Instantly share code, notes, and snippets.

@mjpitz
Created July 8, 2021 15:26
Show Gist options
  • Save mjpitz/93772f680ce4c87d6ec5a12210545f0c to your computer and use it in GitHub Desktop.
Save mjpitz/93772f680ce4c87d6ec5a12210545f0c to your computer and use it in GitHub Desktop.
Dockerfile for RedisRaft build
FROM ubuntu:21.04 AS builder
WORKDIR /scratch
RUN apt-get update -y && apt-get install -y ca-certificates git build-essential libtool cmake libbsd-dev peg
ARG REDISRAFT_VERSION="4bbf5af1"
RUN git clone https://github.com/RedisLabs/redisraft.git redisraft && \
cd redisraft && \
git checkout ${REDISRAFT_VERSION} && \
git submodule init && \
git submodule update && \
make && \
ls && \
cd ..
FROM ubuntu:21.04
RUN apt-get update -y && apt-get install -y libgomp1 build-essential redis-server
COPY --from=builder /scratch/redisraft/redisraft.so /usr/lib/redis/modules/redisraft.so
CMD [ "redis-server", "--loadmodule", "/usr/lib/redis/modules/redisraft.so", "--protected-mode", "no" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment