-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 939 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 939 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
30
31
32
ARG version=
ARG base=redis:${version}-alpine
###
FROM ${base} as rejson
ARG rejson_version=2.2.0
WORKDIR /
RUN apk add --no-cache --virtual .build-deps \
build-base \
rust \
cargo \
clang-libs && \
wget -O - https://github.com/RedisJSON/RedisJSON/archive/refs/tags/v${rejson_version}.tar.gz | tar xz && \
cd RedisJSON-${rejson_version} && \
cargo build --release && \
install -D -o redis -g redis -t /usr/lib/redis/modules target/release/librejson.so && \
apk del .build-deps
###
FROM ${base}
CMD ["redis-server", "--loadmodule", "/usr/lib/redis/modules/rejson.so"]
RUN apk add --virtual .run-deps \
libgcc
COPY --from=rejson --chown=redis:redis /usr/lib/redis/modules/librejson.so /usr/lib/redis/modules/rejson.so