forked from RedisLabsModules/redismodule-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (37 loc) · 1.14 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
# BUILD redisfab/redismodule-rs:${VERSION}-${ARCH}-${OSNICK}
ARG REDIS_VER=6.2.5
# bullseye|bionic|xenial|centos8|centos7
ARG OSNICK=bullseye
# ARCH=x64|arm64v8|arm32v7
ARG ARCH=x64
ARG PACK=0
ARG TEST=0
#----------------------------------------------------------------------------------------------
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK} AS builder
ARG OSNICK
ARG OS
ARG ARCH
ARG REDIS_VER
ARG PACK
ARG TEST
RUN echo "Building for ${OSNICK} (${OS}) for ${ARCH} [with Redis ${REDIS_VER}]"
ADD ./ /build
WORKDIR /build
RUN ./deps/readies/bin/getpy3
RUN ./sbin/system-setup.py
RUN bash -l -c "make info"
RUN bash -l -c make
RUN set -ex ;\
if [ "$TEST" = "1" ]; then bash -l -c "TEST= make test"; fi
RUN set -ex ;\
mkdir -p bin/artifacts ;\
if [ "$PACK" = "1" ]; then bash -l -c "make pack"; fi
#----------------------------------------------------------------------------------------------
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK}
ARG REDIS_VER
ENV LIBDIR /usr/lib/redis/modules
WORKDIR /data
RUN mkdir -p "$LIBDIR"
COPY --from=builder /build/bin/artifacts/ /var/opt/redislabs/artifacts
EXPOSE 6379
CMD ["redis-server"]