forked from RedisJSON/RedisJSON
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (25 loc) · 689 Bytes
/
Dockerfile
File metadata and controls
29 lines (25 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM redis:latest as builder
ENV LIBDIR /usr/lib/redis/modules
ENV DEPS "python python-setuptools python-pip wget unzip build-essential"
# Set up a build environment
RUN set -ex;\
deps="$DEPS";\
apt-get update; \
apt-get install -y --no-install-recommends $deps;\
pip install rmtest;
# Build the source
ADD . /REJSON
WORKDIR /REJSON
RUN set -ex;\
make clean; \
deps="$DEPS";\
make all -j 4; \
make test;
# Package the runner
FROM redis:latest
ENV LIBDIR /usr/lib/redis/modules
WORKDIR /data
RUN set -ex;\
mkdir -p "$LIBDIR";
COPY --from=builder /REJSON/src/rejson.so "$LIBDIR"
CMD ["redis-server", "--loadmodule", "/usr/lib/redis/modules/rejson.so"]