2

I have a Docker container, that runs the redis:6 image, which builds FROM debian:bullseye-slim. When starting the redis server, I load a shared object file as a module, called redisearch.so. On my new Mac M1Pro Monterey this fails, telling me the file does not exist, even though it clearly does. I have checked that the file is there and made sure the permission is 777 and ownership is root.

On my old mac and another Linux device it runs fine.

Does anyone have a clue what could be the problem here?

Dockerfile

############ COMPILING OUR REDISSEARCH EXTENSION
FROM debian:buster-slim AS builder

RUN apt-get update 
RUN apt-get install -y git
RUN apt-get install -y libatomic1
RUN apt-get install -y cmake

WORKDIR /home
RUN git clone https://github.com/RediSearch/RediSearch.git
WORKDIR /home/RediSearch

RUN rm ./tests/ctests/ext-example/*

COPY ./redisearch-ext/ ./tests/ctests/ext-example/

WORKDIR ./tests/ctests/ext-example/
RUN make jurata_extension.so

############ GETTING THE REDISEARCH SHARED OBJECT FILE AND PUTTING IT ON A REDIS SERVER
# Openshift compatible version of redissearch
FROM redislabs/redisearch:1.6.14 as redisearch
FROM redis:6

# ENV LD_LIBRARY_PATH /usr/lib/redis/modules

RUN apt-get update
RUN apt-get install -y sudo

COPY --from=redisearch /usr/lib/redis/modules/redisearch.so /usr/lib/redis/modules/
COPY --from=builder home/RediSearch/tests/ctests/ext-example/jurata_extension.so ./
COPY --from=builder home/RediSearch/tests/ctests/ext-example/jurata_extension.so /usr/lib/redis/modules/
ADD container-entrypoint.sh /

EXPOSE 6379

CMD ls -l  /usr/lib/redis/modules/redisearch.so; sudo /usr/local/bin/redis-server --loadmodule /usr/lib/redis/modules/redisearch.so

Log Output

-rwxr-xr-x 1 root root 8531584 Sep  6  2020 /usr/lib/redis/modules/redisearch.so
10:C 04 Nov 2021 10:01:02.540 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10:C 04 Nov 2021 10:01:02.540 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=10, just started
10:C 04 Nov 2021 10:01:02.540 # Configuration loaded
10:M 04 Nov 2021 10:01:02.540 * monotonic clock: POSIX clock_gettime
10:M 04 Nov 2021 10:01:02.540 * Running mode=standalone, port=6379.
10:M 04 Nov 2021 10:01:02.540 # Server initialized
10:M 04 Nov 2021 10:01:02.541 # Module /usr/lib/redis/modules/redisearch.so failed to load: /usr/lib/redis/modules/redisearch.so: cannot open shared object file: No such file or directory
10:M 04 Nov 2021 10:01:02.541 # Can't load module from /usr/lib/redis/modules/redisearch.so: server aborting
Deef
  • 51
  • 4

0 Answers0