Add base version of Redis modules
[ric-plt/dbaas.git] / docker / Dockerfile.redis
index 8d02fe3..a8b0c32 100644 (file)
 FROM ubuntu:latest
 
 # Install redis
-RUN apt-get update && \
+RUN apt update && \
     apt install -y redis-server && \
-    apt-get clean
+    apt clean
+
+# Install Redis modules
+RUN apt install -y build-essential && \
+    apt install -y automake && \
+    apt install -y libtool && \
+    apt clean
+COPY ./redismodule ./redismodule
+WORKDIR /redismodule
+RUN ./autogen.sh && \
+    ./configure && \
+    make install -j
 
 # Create suitable configuration file
 RUN sed -i 's/^\(bind .*\)$/# \1/' /etc/redis/redis.conf && \
     sed -i 's/^\(daemonize .*\)$/# \1/' /etc/redis/redis.conf && \
     sed 's/^protected-mode yes/protected-mode no/' -i /etc/redis/redis.conf && \
+    echo 'loadmodule /usr/local/libexec/redismodule/libredismodule.so' >> /etc/redis/redis.conf && \
     sed -i 's/^\(save .*\)$/# \1/' /etc/redis/redis.conf && \
     echo 'save ""' >> /etc/redis/redis.conf