Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/knut

containers/falkordb-valkey9/Containerfile

# FalkorDB graph module compiled from source, served by Valkey 9 (newest).
#
# The upstream falkordb/falkordb image still ships its own Redis-lineage
# server; we want the module on Valkey 9.x, so we compile it in-container
# (multi-stage: heavy toolchain never reaches the runtime image).
#
# Build (slow the first time — GraphBLAS is a big compile):
#   podman build -t knut-falkordb-valkey9 -f containers/falkordb-valkey9/Containerfile .
#
# Run:
#   podman run -p 6379:6379 knut-falkordb-valkey9

ARG VALKEY_TAG=9.1.0-trixie
ARG FALKORDB_REF=master

# ── build stage ──────────────────────────────────────────────────────────────
FROM docker.io/library/debian:trixie AS build
ARG FALKORDB_REF

RUN apt-get update && apt-get install -y --no-install-recommends \
        build-essential cmake m4 automake libtool autoconf pkg-config \
        peg libomp-dev python3 python3-venv git ca-certificates curl \
        astyle libssl-dev zlib1g-dev \
    && rm -rf /var/lib/apt/lists/*

# FalkorDB's build uses rust for some vendored deps.
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /src
RUN git clone --depth 1 --branch ${FALKORDB_REF} --recurse-submodules \
        --shallow-submodules https://github.com/FalkorDB/FalkorDB.git
WORKDIR /src/FalkorDB
# FalkorDB gates on redis-server >= 8.0; Valkey 9 reports redis-compat 7.2.x,
# so lower the gate to 7.0 (the module API FalkorDB uses is present there).
RUN sed -i 's/#define MIN_REDIS_VERSION_MAJOR 8/#define MIN_REDIS_VERSION_MAJOR 7/' src/module.c
RUN make -j"$(nproc)" \
    && find bin -name falkordb.so -exec cp {} /falkordb.so \;

# ── runtime stage ────────────────────────────────────────────────────────────
FROM docker.io/valkey/valkey:${VALKEY_TAG}
USER root
# GraphBLAS inside the module needs the OpenMP runtime.
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 \
    && rm -rf /var/lib/apt/lists/*
USER valkey
COPY --from=build /falkordb.so /usr/lib/valkey/falkordb.so
EXPOSE 6379
CMD ["valkey-server", "--loadmodule", "/usr/lib/valkey/falkordb.so", "--protected-mode", "no"]