This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
91 lines (59 loc) · 2.7 KB
/
Dockerfile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM debian as REDIS_GRAPH_BUILDER
WORKDIR /
RUN apt-get update && apt-get install -y git build-essential cmake m4 automake peg libtool autoconf python2
RUN git clone --recurse-submodules -j8 https://github.com/RedisGraph/RedisGraph.git && cd RedisGraph && git checkout $(git tag | sort -V | tail -1)
WORKDIR /RedisGraph
RUN ./deps/readies/bin/getupdates
RUN ./deps/readies/bin/getpy3
RUN ./deps/readies/bin/getpy2
RUN make -j4
FROM debian as REDIS_SEARCH_BUILDER
WORKDIR /
RUN apt-get update && apt-get install -y git
RUN git clone --recursive https://github.com/RediSearch/RediSearch.git && cd RediSearch && git checkout $(git tag | sort -V | tail -1)
WORKDIR /RediSearch
RUN ./deps/readies/bin/getpy3
RUN ./sbin/system-setup.py
RUN make build
RUN cp bin/linux-*-release/search/redisearch.so .
FROM debian as REDIS_JSON_BUILDER
WORKDIR /
RUN apt-get update && apt-get install -y git gcc libclang-dev
RUN git clone --recursive https://github.com/RedisJSON/RedisJSON.git && cd RedisJSON && git checkout $(git tag | sort -V | tail -1)
WORKDIR /RedisJSON
RUN ./deps/readies/bin/getupdates
RUN ./deps/readies/bin/getpy3
RUN ./deps/readies/bin/getrust
ENV PATH "/root/.cargo/bin:$PATH"
RUN cargo fetch
RUN cargo build --release --offline
RUN cp target/release/librejson.so rejson.so
FROM debian as REDIS_BLOOM_BUILDER
WORKDIR /
RUN apt-get update && apt-get install -y git
RUN git clone --recursive https://github.com/RedisBloom/RedisBloom.git && cd RedisBloom && git checkout $(git tag | sort -V | tail -1)
WORKDIR /RedisBloom
RUN ./deps/readies/bin/getpy3
RUN ./system-setup.py
RUN make
FROM debian as REDIS_TIME_SERIES_BUILDER
WORKDIR /
RUN apt-get update && apt-get install -y git
RUN git clone --recursive https://github.com/RedisTimeSeries/RedisTimeSeries.git && cd RedisTimeSeries && git checkout $(git tag | sort -V | tail -1)
WORKDIR /RedisTimeSeries
RUN ./deps/readies/bin/getpy3
RUN ./system-setup.py
RUN make setup
RUN make
RUN cp bin/linux-*-release/redistimeseries.so .
FROM redis:latest
COPY entrypoint.sh /entrypoint.sh
COPY --from=REDIS_JSON_BUILDER /RedisJSON/rejson.so /usr/lib/redisjson.so
COPY --from=REDIS_SEARCH_BUILDER /RediSearch/redisearch.so /usr/lib/redisearch.so
COPY --from=REDIS_BLOOM_BUILDER /RedisBloom/redisbloom.so /usr/lib/redisbloom.so
COPY --from=REDIS_TIME_SERIES_BUILDER /RedisTimeSeries/redistimeseries.so /usr/lib/redistimeseries.so
#COPY --from=REDIS_GEARS_BUILDER /RedisGears/redisgears.so /usr/lib/redisgears.so
#COPY --from=REDIS_GEARS_BUILDER /RedisGears/gears_python.so /usr/lib/gears_python.so
#COPY --from=REDIS_AI_BUILDER /RedisAI/install-cpu/redisai.so /usr/lib/redisai.so
COPY --from=REDIS_GRAPH_BUILDER /RedisGraph/src/redisgraph.so /usr/lib/redisgraph.so
CMD ["bash", "/entrypoint.sh"]