# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:latest
+FROM nexus3.o-ran-sc.org:10004/bldr-alpine3:6-a3.9-nng as build-env
-# Install redis
-RUN apt-get update && \
- apt install -y redis-server && \
- apt-get 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
-
-EXPOSE 6379
-
-CMD ["redis-server", "/etc/redis/redis.conf"]
+FROM redis:5.0.5-alpine3.9
+RUN apk add curl
+COPY --from=build-env /usr/local/libexec/redismodule/libredismodule.so /usr/local/libexec/redismodule/libredismodule.so
+WORKDIR /data