Created
March 14, 2025 09:44
-
-
Save amin3mej/b0e77eae0b1601afa06502260ddb11f0 to your computer and use it in GitHub Desktop.
Valkey with Json Module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:22.04 AS json-builder | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
git \ | |
cmake \ | |
python3 \ | |
python3-pip \ | |
openssh-client \ | |
pkg-config | |
RUN git clone https://github.com/valkey-io/valkey-json.git /ValkeyJSON | |
WORKDIR /ValkeyJSON | |
RUN rm -rf tst/* | |
RUN echo 'message("tst/CMakeLists.txt")' > tst/CMakeLists.txt | |
RUN python3 -m pip install --upgrade pip && pip install -r requirements.txt | |
RUN mkdir -p build && cd build && pwd && cmake .. && make | |
FROM valkey/valkey:latest | |
RUN mkdir -p /opt/valkey/modules | |
COPY --from=json-builder /ValkeyJSON/build/src/libjson.so /opt/valkey/modules/ | |
RUN echo "loadmodule /opt/valkey/modules/libjson.so" > /opt/valkey/valkey.conf | |
CMD ["valkey-server", "/opt/valkey/valkey.conf", "--appendonly", "yes"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment