1# BUILD redisfab/redisearch:${VERSION}-${ARCH}-${OSNICK} 2 3ARG REDIS_VER=6.2.5 4 5# OSNICK=bullseye|centos7|centos8|xenial|bionic 6ARG OSNICK=bullseye 7 8# OS=debian:bullseye-slim|centos:7|centos:8|ubuntu:xenial|ubuntu:bionic 9ARG OS=debian:bullseye-slim 10 11# ARCH=x64|arm64v8|arm32v7 12ARG ARCH=x64 13 14ARG GIT_DESCRIBE_VERSION 15 16#---------------------------------------------------------------------------------------------- 17FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK} AS redis 18FROM ${OS} AS builder 19 20ARG OSNICK 21ARG OS 22ARG ARCH 23ARG REDIS_VER 24ARG GIT_DESCRIBE_VERSION 25 26RUN echo "Building for ${OSNICK} (${OS}) for ${ARCH}" 27 28WORKDIR /build 29COPY --from=redis /usr/local/ /usr/local/ 30 31ADD . /build 32 33RUN ./deps/readies/bin/getupdates 34RUN ./deps/readies/bin/getpy2 35RUN ./system-setup.py 36 37RUN /usr/local/bin/redis-server --version 38RUN make fetch SHOW=1 39RUN make build SHOW=1 CMAKE_ARGS="-DGIT_DESCRIBE_VERSION=${GIT_DESCRIBE_VERSION}" 40 41# ARG PACK=0 42ARG TEST=0 43 44# RUN if [ "$PACK" = "1" ]; then make pack; fi 45RUN if [ "$TEST" = "1" ]; then TEST= make test; fi 46 47#---------------------------------------------------------------------------------------------- 48FROM redisfab/rejson:2.0-${ARCH}-${OSNICK} AS json 49FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK} 50 51ARG OSNICK 52ARG OS 53ARG ARCH 54ARG REDIS_VER 55# ARG PACK 56 57WORKDIR /data 58 59ENV LIBDIR /usr/lib/redis/modules/ 60RUN mkdir -p "$LIBDIR"; 61 62COPY --from=builder /build/build/redisearch.so* "$LIBDIR" 63COPY --from=json /usr/lib/redis/modules/rejson.so* "$LIBDIR" 64 65CMD ["redis-server", "--loadmodule", "/usr/lib/redis/modules/redisearch.so", "--loadmodule", "/usr/lib/redis/modules/rejson.so"] 66